Results 1 to 4 of 4

Thread: FileConverter fix to add TAB driven file name completion

  1. #1
    Join Date
    Nov 2009
    Location
    Chicago, IL
    Posts
    16

    Default FileConverter fix to add TAB driven file name completion

    Could you guys pls add couple of lines into org.springframework.roo.shell.converters.FileConve rter.getAllPossibleValues() to implement file name completion?

    Something like:

    for (String file : new File(".").list()) {
    if (existingData==null || file.toString().startsWith(existingData)) {
    completions.add(file);
    }
    }

    Helps a lot for commands like 'script --file <TAB>'. Just hate to replace your FileConverter with every release with our custom version.

    And, btw, what is the hidden purpose of having:

    // Present what they've typed, plus "*", to get the next level of completions
    if (!existingData.endsWith("*")) {
    existingData = existingData + "*";
    }

    change to existingData is not visible outside the method scope anyways, so what is the trick? :-)

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Hi Roman

    Thanks for the suggestion. We're absolutely happy to apply this patch, but would you mind submitting it as a Jira issue at https://jira.springsource.org/browse/ROO as a patch against the current SVN trunk? Cool enhancement BTW, please keep them coming... :-)

    Cheers
    Ben
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  3. #3
    Join Date
    Nov 2009
    Location
    Chicago, IL
    Posts
    16

    Default

    done ROO-414

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    Patch was applied within 10 minutes of logging the Jira issue. :-) So this will be available in Roo 1.0.0.RC4 for those interested. Thanks Roman!
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •