Other First refactoring feature!

Discussion in 'B4J Questions' started by Erel, Mar 9, 2017.

  1. Erel

    Erel Administrator Staff Member Licensed User

    The next version of B4J (and all other B4X tools) will include the very first refactoring feature: Rename To.

    It makes it simple to rename global and local variables, subs and type fields.
    It works as an extension to the useful Find All References tool. First you find the references and then you can rename the identifier name:

    rename.gif
    It will correctly change the name in all relevant modules.

    Another new feature is the ability to replace from the Quick Search tool. The idea is similar, you search for something and see all results and then you can then replace them:

    [​IMG]

    You can choose whether to replace in the current selected text, current module or all modules.
     
    Last edited: Mar 9, 2017
    f0raster0, BaGRoS, Sandman and 41 others like this.
  2. alwaysbusy

    alwaysbusy Expert Licensed User

    Very nice and productive feature!
     
    joulongleu and Erel like this.
  3. Cableguy

    Cableguy Expert Licensed User

    Can it also rename nodes?
    I bet I will abusing this feature !
     
    joulongleu likes this.
  4. Erel

    Erel Administrator Staff Member Licensed User

    You can change the name of any variable you like. It will not change the name inside the layout file.
     
    joulongleu likes this.
  5. tchart

    tchart Active Member Licensed User

    Nice, can't wait.
     
  6. LucaMs

    LucaMs Expert Licensed User

    Very useful and very desired.

    In the gif you can see that it is also a special implementation: it also renames routine called by CallSub and CallSubDelayed.

    Great!
     
    joulongleu and Erel like this.
  7. Filippo

    Filippo Expert Licensed User

    Thank you Erel!
    It's never too late, after 2 years comes my wish.:)
     
    joulongleu likes this.
  8. MarcoRome

    MarcoRome Expert Licensed User

    Very very good ;)
     
    joulongleu likes this.
  9. Martin Larsen

    Martin Larsen Active Member Licensed User

    Simply fantastic. I thought about wishing this feature just a week ago but noticed someone else had already wished it. Maybe you could read my mind, though!
     
  10. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    Brilliant, when is the next release due ?
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    Beta will probably be released this week.
     
    MarcoRome likes this.
  12. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    Cool, cant wait :)
     
  13. Rusty

    Rusty Well-Known Member Licensed User

    When I touch F7 or search, there is no option to rename.
    Am I doing something wrong?
    I'm using version 6.80
    Thanks
    Rusty
     
  14. Daestrum

    Daestrum Well-Known Member Licensed User

    I think you have to highlight/select the variable before pressing F7.
     
  15. Rusty

    Rusty Well-Known Member Licensed User

    I do this already. It will find the references but no "rename" option...
    Thanks
     
  16. LucaMs

    LucaMs Expert Licensed User

    B4A? This is B4J.
     
  17. Daestrum

    Daestrum Well-Known Member Licensed User

    I just tried it on B4A 6.80 and it didn't work the same as on B4J 5.50Beta and B4J 5.00

    There is no rename on B4A 6.80
     
    Last edited: Apr 22, 2017
  18. LucaMs

    LucaMs Expert Licensed User

    B4J allow you to rename "identifiers" (variable, routine names), B4A does not (now... soon, I think)
     
  19. Rusty

    Rusty Well-Known Member Licensed User

    Erel's first post says:
    The next version of B4J (and all other B4X tools) will include the very first refactoring feature: Rename To.
    ...
    Daestrum,
    Can you describe how you get this to work?
    I highlight a variable, touch F7 and all I get is the list of occurrences and no options to change it...
    Thanks to all :)
    Rusty
     
  20. Daestrum

    Daestrum Well-Known Member Licensed User

    I was incorrect and corrected my posting - it does NOT work on B4A
    I didn't look close enough when I tried, due to so many variables being displayed in the find all page.

    Sorry if I misled you.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice