Browse Source

Remove location data from tasks as that is a concern of the container and not the tasks.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270173 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
29b7a3e4ec
14 changed files with 6 additions and 76 deletions
  1. +1
    -26
      proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
  2. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/ProjectHelper.java
  3. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/UnknownElement.java
  4. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java
  5. +2
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
  6. +0
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  7. +0
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
  8. +1
    -26
      proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java
  9. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/ProjectHelper.java
  10. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/UnknownElement.java
  11. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Get.java
  12. +2
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tstamp.java
  13. +0
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  14. +0
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java

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

@@ -697,7 +697,7 @@ public class Project
{
log( "Trying to override old definition of task " + taskName,
MSG_WARN );
invalidateCreatedTasks( taskName );
}
}

@@ -1311,29 +1311,4 @@ public class Project
listener.messageLogged( event );
}
}

/**
* Mark tasks as invalid which no longer are of the correct type for a given
* taskname.
*
* @param type Description of Parameter
*/
private void invalidateCreatedTasks( String type )
{
synchronized( createdTasks )
{
Vector v = (Vector)createdTasks.get( type );
if( v != null )
{
Enumeration enum = v.elements();
while( enum.hasMoreElements() )
{
Task t = (Task)enum.nextElement();
t.markInvalid();
}
v.removeAllElements();
createdTasks.remove( type );
}
}
}
}

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

@@ -1018,7 +1018,6 @@ public class ProjectHelper
task.setTaskName( tag );
}

task.setLocation( new Location( buildFile.toString(), locator.getLineNumber(), locator.getColumnNumber() ) );
configureId( task, attrs );

// Top level tasks don't have associated targets


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

@@ -250,7 +250,6 @@ public class UnknownElement extends Task

if( task != null )
{
task.setLocation( getLocation() );
// UnknownElement always has an associated target
task.setOwningTarget( target );
task.init();


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

@@ -305,7 +305,6 @@ public class Get extends Task
Touch touch = (Touch)project.createTask( "touch" );
touch.setOwningTarget( target );
touch.setTaskName( getTaskName() );
touch.setLocation( getLocation() );
touch.setFile( file );
touch.setMillis( timemillis );
touch.touch();


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

@@ -74,7 +74,7 @@ public class Tstamp extends Task
while( i.hasMoreElements() )
{
CustomFormat cts = (CustomFormat)i.nextElement();
cts.execute( project, d, location );
cts.execute( project, d );
}

}
@@ -207,7 +207,7 @@ public class Tstamp extends Task
field = unit.getCalendarField();
}

public void execute( Project project, Date date, Location location )
public void execute( Project project, Date date )
throws TaskException
{
if( propertyName == null )


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

@@ -51,7 +51,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
protected Path extdirs;
protected boolean includeAntRuntime;
protected boolean includeJavaRuntime;
protected Location location;
protected String memoryInitialSize;
protected String memoryMaximumSize;
protected Project project;
@@ -80,7 +79,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
compileList = attributes.getFileList();
compileClasspath = attributes.getClasspath();
project = attributes.getProject();
location = attributes.getLocation();
includeAntRuntime = attributes.getIncludeantruntime();
includeJavaRuntime = attributes.getIncludejavaruntime();
memoryInitialSize = attributes.getMemoryInitialSize();


+ 0
- 5
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java View File

@@ -460,11 +460,6 @@ public class GenericDeploymentTool implements EJBDeploymentTool
return baseName;
}

protected Location getLocation()
{
return getTask().getLocation();
}

/**
* Returns the Public ID of the DTD specified in the EJB descriptor. Not
* every vendor-specific <code>DeploymentTool</code> will need to reference


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

@@ -697,7 +697,7 @@ public class Project
{
log( "Trying to override old definition of task " + taskName,
MSG_WARN );
invalidateCreatedTasks( taskName );
}
}

@@ -1311,29 +1311,4 @@ public class Project
listener.messageLogged( event );
}
}

/**
* Mark tasks as invalid which no longer are of the correct type for a given
* taskname.
*
* @param type Description of Parameter
*/
private void invalidateCreatedTasks( String type )
{
synchronized( createdTasks )
{
Vector v = (Vector)createdTasks.get( type );
if( v != null )
{
Enumeration enum = v.elements();
while( enum.hasMoreElements() )
{
Task t = (Task)enum.nextElement();
t.markInvalid();
}
v.removeAllElements();
createdTasks.remove( type );
}
}
}
}

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

@@ -1018,7 +1018,6 @@ public class ProjectHelper
task.setTaskName( tag );
}

task.setLocation( new Location( buildFile.toString(), locator.getLineNumber(), locator.getColumnNumber() ) );
configureId( task, attrs );

// Top level tasks don't have associated targets


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

@@ -250,7 +250,6 @@ public class UnknownElement extends Task

if( task != null )
{
task.setLocation( getLocation() );
// UnknownElement always has an associated target
task.setOwningTarget( target );
task.init();


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

@@ -305,7 +305,6 @@ public class Get extends Task
Touch touch = (Touch)project.createTask( "touch" );
touch.setOwningTarget( target );
touch.setTaskName( getTaskName() );
touch.setLocation( getLocation() );
touch.setFile( file );
touch.setMillis( timemillis );
touch.touch();


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

@@ -74,7 +74,7 @@ public class Tstamp extends Task
while( i.hasMoreElements() )
{
CustomFormat cts = (CustomFormat)i.nextElement();
cts.execute( project, d, location );
cts.execute( project, d );
}

}
@@ -207,7 +207,7 @@ public class Tstamp extends Task
field = unit.getCalendarField();
}

public void execute( Project project, Date date, Location location )
public void execute( Project project, Date date )
throws TaskException
{
if( propertyName == null )


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

@@ -51,7 +51,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
protected Path extdirs;
protected boolean includeAntRuntime;
protected boolean includeJavaRuntime;
protected Location location;
protected String memoryInitialSize;
protected String memoryMaximumSize;
protected Project project;
@@ -80,7 +79,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
compileList = attributes.getFileList();
compileClasspath = attributes.getClasspath();
project = attributes.getProject();
location = attributes.getLocation();
includeAntRuntime = attributes.getIncludeantruntime();
includeJavaRuntime = attributes.getIncludejavaruntime();
memoryInitialSize = attributes.getMemoryInitialSize();


+ 0
- 5
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java View File

@@ -460,11 +460,6 @@ public class GenericDeploymentTool implements EJBDeploymentTool
return baseName;
}

protected Location getLocation()
{
return getTask().getLocation();
}

/**
* Returns the Public ID of the DTD specified in the EJB descriptor. Not
* every vendor-specific <code>DeploymentTool</code> will need to reference


Loading…
Cancel
Save