Feature request: Context dependent renaming

  • Han Joosten

    Han Joosten - 2013-01-17


    Is it possible to rename all variables with the same haskell-binding in an easy/clever way? That would be auwsome.

    A simple search and replace function doesn't do the job: several declarations can have the same name.
    A variable could be used in multiple modules, so the renaming should consider each of them.

  • JP Moresmau

    JP Moresmau - 2013-01-17

    Is Refactor->Rename not doing that for you?

  • Han Joosten

    Han Joosten - 2013-01-18

    In only does this for functions. However, it is also possible to bind variables in other ways (eg function arguments, in list comprehention).
    Refactor->Rename is a good place to implement the functionality though.

  • JP Moresmau

    JP Moresmau - 2013-01-18

    Yes, refactor-> rename only works with named things like constructors and functions, not for local bindings. I've just added that support, using the occurrences system: if we can't find any usage of the symbol in the usage database, we rename all the tokens that have the same name in the same outline span (so in the current function). This lets you rename variables, local functions, etc... In the next version!

  • Han Joosten

    Han Joosten - 2013-01-18

    That is great! Thanks. I'm looking foreward to it!


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks