Browse Source

No need for tasks to know about their wrappers - thats a concern of the container.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270180 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
884d56754b
8 changed files with 0 additions and 110 deletions
  1. +0
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/RuntimeConfigurable.java
  2. +0
    -25
      proposal/myrmidon/src/main/org/apache/tools/ant/Task.java
  3. +0
    -23
      proposal/myrmidon/src/main/org/apache/tools/ant/UnknownElement.java
  4. +0
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
  5. +0
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/RuntimeConfigurable.java
  6. +0
    -25
      proposal/myrmidon/src/todo/org/apache/tools/ant/Task.java
  7. +0
    -23
      proposal/myrmidon/src/todo/org/apache/tools/ant/UnknownElement.java
  8. +0
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java

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

@@ -125,8 +125,6 @@ public class RuntimeConfigurable
if( child.wrappedObject instanceof Task ) if( child.wrappedObject instanceof Task )
{ {
Task childTask = (Task)child.wrappedObject; Task childTask = (Task)child.wrappedObject;
childTask.setRuntimeConfigurableWrapper( child );
childTask.maybeConfigure();
} }
else else
{ {


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

@@ -16,7 +16,6 @@ public abstract class Task
protected Target target; protected Target target;
protected String description; protected String description;
protected String taskType; protected String taskType;
protected RuntimeConfigurable wrapper;


/** /**
* Sets a description of the current action. It will be usefull in * Sets a description of the current action. It will be usefull in
@@ -53,21 +52,6 @@ public abstract class Task
{ {
return target; return target;
} }

/**
* Returns the wrapper class for runtime configuration.
*
* @return The RuntimeConfigurableWrapper value
*/
public RuntimeConfigurable getRuntimeConfigurableWrapper()
{
if( wrapper == null )
{
wrapper = new RuntimeConfigurable( this, getName() );
}
return wrapper;
}

/** /**
* Perform this task * Perform this task
*/ */
@@ -146,15 +130,6 @@ public abstract class Task
public void maybeConfigure() public void maybeConfigure()
throws TaskException throws TaskException
{ {
if( wrapper != null )
{
wrapper.maybeConfigure( project );
}
}

protected void setRuntimeConfigurableWrapper( RuntimeConfigurable wrapper )
{
this.wrapper = wrapper;
} }


protected void handleErrorOutput( String line ) protected void handleErrorOutput( String line )


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

@@ -103,25 +103,6 @@ public class UnknownElement extends Task
public void maybeConfigure() public void maybeConfigure()
throws TaskException throws TaskException
{ {
realThing = makeObject( this, wrapper );

wrapper.setProxy( realThing );
if( realThing instanceof Task )
{
( (Task)realThing ).setRuntimeConfigurableWrapper( wrapper );
}

handleChildren( realThing, wrapper );

wrapper.maybeConfigure( project );
if( realThing instanceof Task )
{
target.replaceChild( this, realThing );
}
else
{
target.replaceChild( this, wrapper );
}
} }


protected BuildException getNotFoundException( String what, protected BuildException getNotFoundException( String what,
@@ -182,10 +163,6 @@ public class UnknownElement extends Task
} }


childWrapper.setProxy( realChild ); childWrapper.setProxy( realChild );
if( parent instanceof TaskContainer )
{
( (Task)realChild ).setRuntimeConfigurableWrapper( childWrapper );
}


child.handleChildren( realChild, childWrapper ); child.handleChildren( realChild, childWrapper );




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

@@ -116,11 +116,6 @@ public class Property extends Task
return file; return file;
} }


public String getName()
{
return name;
}

public Reference getRefid() public Reference getRefid()
{ {
return ref; return ref;


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

@@ -125,8 +125,6 @@ public class RuntimeConfigurable
if( child.wrappedObject instanceof Task ) if( child.wrappedObject instanceof Task )
{ {
Task childTask = (Task)child.wrappedObject; Task childTask = (Task)child.wrappedObject;
childTask.setRuntimeConfigurableWrapper( child );
childTask.maybeConfigure();
} }
else else
{ {


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

@@ -16,7 +16,6 @@ public abstract class Task
protected Target target; protected Target target;
protected String description; protected String description;
protected String taskType; protected String taskType;
protected RuntimeConfigurable wrapper;


/** /**
* Sets a description of the current action. It will be usefull in * Sets a description of the current action. It will be usefull in
@@ -53,21 +52,6 @@ public abstract class Task
{ {
return target; return target;
} }

/**
* Returns the wrapper class for runtime configuration.
*
* @return The RuntimeConfigurableWrapper value
*/
public RuntimeConfigurable getRuntimeConfigurableWrapper()
{
if( wrapper == null )
{
wrapper = new RuntimeConfigurable( this, getName() );
}
return wrapper;
}

/** /**
* Perform this task * Perform this task
*/ */
@@ -146,15 +130,6 @@ public abstract class Task
public void maybeConfigure() public void maybeConfigure()
throws TaskException throws TaskException
{ {
if( wrapper != null )
{
wrapper.maybeConfigure( project );
}
}

protected void setRuntimeConfigurableWrapper( RuntimeConfigurable wrapper )
{
this.wrapper = wrapper;
} }


protected void handleErrorOutput( String line ) protected void handleErrorOutput( String line )


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

@@ -103,25 +103,6 @@ public class UnknownElement extends Task
public void maybeConfigure() public void maybeConfigure()
throws TaskException throws TaskException
{ {
realThing = makeObject( this, wrapper );

wrapper.setProxy( realThing );
if( realThing instanceof Task )
{
( (Task)realThing ).setRuntimeConfigurableWrapper( wrapper );
}

handleChildren( realThing, wrapper );

wrapper.maybeConfigure( project );
if( realThing instanceof Task )
{
target.replaceChild( this, realThing );
}
else
{
target.replaceChild( this, wrapper );
}
} }


protected BuildException getNotFoundException( String what, protected BuildException getNotFoundException( String what,
@@ -182,10 +163,6 @@ public class UnknownElement extends Task
} }


childWrapper.setProxy( realChild ); childWrapper.setProxy( realChild );
if( parent instanceof TaskContainer )
{
( (Task)realChild ).setRuntimeConfigurableWrapper( childWrapper );
}


child.handleChildren( realChild, childWrapper ); child.handleChildren( realChild, childWrapper );




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

@@ -116,11 +116,6 @@ public class Property extends Task
return file; return file;
} }


public String getName()
{
return name;
}

public Reference getRefid() public Reference getRefid()
{ {
return ref; return ref;


Loading…
Cancel
Save