A simple fix that I have made is as follows:

In the TagHandler class add a method -
     public boolean canBeRemoved(){
          return false;
     }

for the classes ArgumentHandler, LoopControlHandler (and others that need
to be removable)
     override the above method and return true.
ie add the methods

public boolean ArgumentHandler.canBeRemoved(){
     return true;
}

public boolean LoopControlHandler.canBeRemoved(){
     return true;
}


In XMLHandler.takeChildObjects(TagHandler handler) method add the following
code
.
.
.
List items = new LinkedList(subTree.list());
iter = items.iterator();
while(iter.hasNext()) { // the 2nd while
     TagHandler item = (TagHandler)iter.next(); // changed
     if(item.canBeRemoved()) { // added line
          replaceSubItems(subTree, item);
          subTree.remove(item);
     }// added line
}
.
.
.

.....and you are right. This code is COMPLEX. Took me almost two days to
figure out. I have added log4j debug statements for the ListedHashTree,
NonGui classes and a no of other classes and will post those in tomorrow.

-Tushar


                                                                                       
                                   
                    "Stover, Michael"                                                  
                                   
                    <Michael.Stover@usa.        To:     
"'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> 
                    xerox.com>                  cc:                                    
                                   
                                                Subject:     RE: loading a jmx         
                                   
                    07/26/01 12:26 PM                                                  
                                   
                    Please respond to                                                  
                                   
                    jmeter-dev                                                         
                                   
                                                                                       
                                   
                                                                                       
                                   



I have the fix for this.  It involves several files, so I will commit it to
CVS tonight if I can (I've been having trouble with my home computer's
network card).

-Mike

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 10:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: loading a jmx
>
>
>
> This was fixed a little while back and I noticed yesterday
> that it was not
> working either. I am working on it and will have a fix
> today(hopefully).
> You may have noticed that Filer, Timer etc are not read back
> into the GUI
> functionality too!
> tushar
>
>
>
>
>
>                     "Raphael PIERONI"
>
>                     <raphael.pieroni@w        To:
> <[EMAIL PROTECTED]>
>                     anadoo.fr>                cc:
>
>                                               Subject:
> loading a jmx
>                     07/26/01 08:33 AM
>
>                     Please respond to
>
>                     jmeter-dev
>
>
>
>
>
>
>
>
> hello,
>
> i have trouble loading from jmx file
> especially the timers and i really need this functionnality
> as my testing
> machine is far from me and w/out any gui (i use telnet and ftp and of
> course the NonGuiDriver)
>
> do there any one which knows what to fix in the code
> ensure the timers are loaded ??
>
> in advance thank you
>
> Raphael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to