Browse Source

A tasks type is equivelent to it's name - no need to distuinguish between the two.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270184 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
aa7165f303
10 changed files with 12 additions and 34 deletions
  1. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
  2. +0
    -11
      proposal/myrmidon/src/main/org/apache/tools/ant/Task.java
  3. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java
  4. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  5. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  6. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java
  7. +0
    -11
      proposal/myrmidon/src/todo/org/apache/tools/ant/Task.java
  8. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Chmod.java
  9. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java
  10. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java

+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/Project.java View File

@@ -840,7 +840,7 @@ public class Project
task = taskA; task = taskA;
} }
task.setProject( this ); task.setProject( this );
task.setTaskType( taskType );
//task.setTaskType( taskType );


String msg = " +Task: " + taskType; String msg = " +Task: " + taskType;
log( msg, MSG_DEBUG ); log( msg, MSG_DEBUG );


+ 0
- 11
proposal/myrmidon/src/main/org/apache/tools/ant/Task.java View File

@@ -14,7 +14,6 @@ public abstract class Task
implements org.apache.myrmidon.api.Task implements org.apache.myrmidon.api.Task
{ {
protected String description; protected String description;
protected String taskType;


/** /**
* Sets a description of the current action. It will be usefull in * Sets a description of the current action. It will be usefull in
@@ -121,15 +120,5 @@ public abstract class Task
{ {
log( line, Project.MSG_INFO ); log( line, Project.MSG_INFO );
} }

/**
* Set the name with which the task has been invoked.
*
* @param type the name the task has been invoked as.
*/
void setTaskType( String type )
{
this.taskType = type;
}
} }



+ 2
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java View File

@@ -74,7 +74,7 @@ public class Chmod extends ExecuteOn
public void setExecutable( String e ) public void setExecutable( String e )
throws TaskException throws TaskException
{ {
throw new TaskException( taskType + " doesn\'t support the executable attribute" );
throw new TaskException( getName() + " doesn\'t support the executable attribute" );
} }


public void setFile( File src ) public void setFile( File src )
@@ -108,7 +108,7 @@ public class Chmod extends ExecuteOn
public void setSkipEmptyFilesets( boolean skip ) public void setSkipEmptyFilesets( boolean skip )
throws TaskException throws TaskException
{ {
throw new TaskException( taskType + " doesn\'t support the skipemptyfileset attribute" );
throw new TaskException( getName() + " doesn\'t support the skipemptyfileset attribute" );
} }


/** /**


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -246,7 +246,7 @@ public class ExecTask extends Task
{ {
if( failOnError ) if( failOnError )
{ {
throw new TaskException( taskType + " returned: " + err );
throw new TaskException( getName() + " returned: " + err );
} }
else else
{ {


+ 2
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -135,7 +135,7 @@ public class ExecuteOn extends ExecTask
{ {
if( srcFilePos != null ) if( srcFilePos != null )
{ {
throw new TaskException( taskType + " doesn\'t support multiple srcfile elements." );
throw new TaskException( getName() + " doesn\'t support multiple srcfile elements." );
} }
srcFilePos = cmdl.createMarker(); srcFilePos = cmdl.createMarker();
return srcFilePos; return srcFilePos;
@@ -152,7 +152,7 @@ public class ExecuteOn extends ExecTask
{ {
if( targetFilePos != null ) if( targetFilePos != null )
{ {
throw new TaskException( taskType + " doesn\'t support multiple targetfile elements." );
throw new TaskException( getName() + " doesn\'t support multiple targetfile elements." );
} }
targetFilePos = cmdl.createMarker(); targetFilePos = cmdl.createMarker();
srcIsFirst = ( srcFilePos != null ); srcIsFirst = ( srcFilePos != null );


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java View File

@@ -840,7 +840,7 @@ public class Project
task = taskA; task = taskA;
} }
task.setProject( this ); task.setProject( this );
task.setTaskType( taskType );
//task.setTaskType( taskType );


String msg = " +Task: " + taskType; String msg = " +Task: " + taskType;
log( msg, MSG_DEBUG ); log( msg, MSG_DEBUG );


+ 0
- 11
proposal/myrmidon/src/todo/org/apache/tools/ant/Task.java View File

@@ -14,7 +14,6 @@ public abstract class Task
implements org.apache.myrmidon.api.Task implements org.apache.myrmidon.api.Task
{ {
protected String description; protected String description;
protected String taskType;


/** /**
* Sets a description of the current action. It will be usefull in * Sets a description of the current action. It will be usefull in
@@ -121,15 +120,5 @@ public abstract class Task
{ {
log( line, Project.MSG_INFO ); log( line, Project.MSG_INFO );
} }

/**
* Set the name with which the task has been invoked.
*
* @param type the name the task has been invoked as.
*/
void setTaskType( String type )
{
this.taskType = type;
}
} }



+ 2
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Chmod.java View File

@@ -74,7 +74,7 @@ public class Chmod extends ExecuteOn
public void setExecutable( String e ) public void setExecutable( String e )
throws TaskException throws TaskException
{ {
throw new TaskException( taskType + " doesn\'t support the executable attribute" );
throw new TaskException( getName() + " doesn\'t support the executable attribute" );
} }


public void setFile( File src ) public void setFile( File src )
@@ -108,7 +108,7 @@ public class Chmod extends ExecuteOn
public void setSkipEmptyFilesets( boolean skip ) public void setSkipEmptyFilesets( boolean skip )
throws TaskException throws TaskException
{ {
throw new TaskException( taskType + " doesn\'t support the skipemptyfileset attribute" );
throw new TaskException( getName() + " doesn\'t support the skipemptyfileset attribute" );
} }


/** /**


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -246,7 +246,7 @@ public class ExecTask extends Task
{ {
if( failOnError ) if( failOnError )
{ {
throw new TaskException( taskType + " returned: " + err );
throw new TaskException( getName() + " returned: " + err );
} }
else else
{ {


+ 2
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -135,7 +135,7 @@ public class ExecuteOn extends ExecTask
{ {
if( srcFilePos != null ) if( srcFilePos != null )
{ {
throw new TaskException( taskType + " doesn\'t support multiple srcfile elements." );
throw new TaskException( getName() + " doesn\'t support multiple srcfile elements." );
} }
srcFilePos = cmdl.createMarker(); srcFilePos = cmdl.createMarker();
return srcFilePos; return srcFilePos;
@@ -152,7 +152,7 @@ public class ExecuteOn extends ExecTask
{ {
if( targetFilePos != null ) if( targetFilePos != null )
{ {
throw new TaskException( taskType + " doesn\'t support multiple targetfile elements." );
throw new TaskException( getName() + " doesn\'t support multiple targetfile elements." );
} }
targetFilePos = cmdl.createMarker(); targetFilePos = cmdl.createMarker();
srcIsFirst = ( srcFilePos != null ); srcIsFirst = ( srcFilePos != null );


Loading…
Cancel
Save