Ignore:
Timestamp:
07/30/08 14:53:21 (16 years ago)
Author:
ra33
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/actions/Simple.java

    r162 r176  
    2121import org.expeditee.agents.SearchAgent;
    2222import org.expeditee.agents.SearchFrameset;
     23import org.expeditee.agents.SearchFramesetFast;
    2324import org.expeditee.agents.SearchTree;
     25import org.expeditee.agents.SearchTreeFast;
    2426import org.expeditee.agents.WriteTree;
    2527import org.expeditee.gui.AttributeUtils;
     
    925927                                long firstFrame = 1;
    926928                                long maxFrame = Long.MAX_VALUE;
    927                                 if(tokens.length > 7){
    928                                         firstFrame = context.getPrimitives().getIntegerValue(tokens[7]);
    929                                         if(tokens.length > 8){
    930                                                 maxFrame = context.getPrimitives().getIntegerValue(tokens[8]);
    931                                         }
    932                                 }
    933                                
    934                                 SearchAgent searchAgent = new SearchFrameset(firstFrame, maxFrame);
     929                                if (tokens.length > 7) {
     930                                        firstFrame = context.getPrimitives().getIntegerValue(
     931                                                        tokens[7]);
     932                                        if (tokens.length > 8) {
     933                                                maxFrame = context.getPrimitives().getIntegerValue(
     934                                                                tokens[8]);
     935                                        }
     936                                }
     937
     938                                SearchAgent searchAgent = null;
     939
     940                                // If replacement needs to be done... use the slow search for
     941                                // now
     942                                // The fast search does not do replacement
     943                                if (bReplace) {
     944                                        searchAgent = new SearchFrameset(firstFrame, maxFrame);
     945                                } else {
     946                                        searchAgent = new SearchFramesetFast(firstFrame, maxFrame);
     947                                }
    935948                                searchAgent.initialise(null, null, frameset, resultsFrameset,
    936949                                                replacementString, pattern);
     
    968981                                String pattern = context.getPrimitives().getStringValue(
    969982                                                tokens[2]);
    970                                 SearchAgent searchAgent = new SearchTree();
     983                                SearchAgent searchAgent = null;
     984                                // If replacement needs to be done... use the slow search for
     985                                // now The fast search does not do replacement
     986                                if (bReplace) {
     987                                        searchAgent = new SearchTree();
     988                                } else {
     989                                        searchAgent = new SearchTreeFast();
     990                                }
    971991                                _agent = searchAgent;
    972992                                searchAgent.initialise(null, null, topFrameName,
Note: See TracChangeset for help on using the changeset viewer.