Announcement Announcement Module
Collapse
No announcement yet.
FileConverter fix to add TAB driven file name completion Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      done ROO-414

      Comment


      • #4
        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!

        Comment

        Working...
        X