ANN: Script Editor Refactoring Support
Matthias Rebbe
matthias_livecode_150811 at m-r-d.de
Wed Mar 20 14:31:24 EDT 2019
Thanks for this great enhancement.
The rename handler is something i would have needed yesterday... Took me some time, but with your enhancement i would have been just some clicks and some typing.
Matthias
Matthias Rebbe
free tools for Livecoders:
https://instamaker.dermattes.de <https://instamaker.dermattes.de/>
https://winsignhelper.dermattes.de <https://winsignhelper.dermattes.de/>
> Am 20.03.2019 um 18:45 schrieb Mark Wieder via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
>
> Announcing (60 days until the San Jose conference):
>
> Script Editor Refactor Plugin
> Brings refactoring support to the LiveCode Script Editor.
> Place the plugin into your user Plugins folder.
> After launching the script editor there will be a new Refactoring menuItem in the Edit menu.
> The Refactoring menuItem will also appear in the contextual menu of the Script Editor.
> The Refactoring menu is inspired by the JetBrains refactoring support in RubyMine, etc.
>
> Rename Handler
> Allows you to rename in just the current script or all scripts in the stack.
>
> Rename Variable
> Both Rename Handler and Rename Variable change all uses of the object.
>
> Convert Literal To Constant
> Creates a constant for the selected literal value.
> For instance, converts the string literal "hello" to
> constant kHello = "hello"
> and changes all references of "hello" to use kHello, i.e.,
> put kHello into tVariable
> instead of
> put "hello" into tVariable
>
> Change Signature
> Change the parameter list for a command or function.
> For instance, change "myCommand pKey" to "myCommand pKey, pValue"
> Modifying parameters will modify calls to the handler in all scripts in the stack.
>
> Safe Delete
> Only deletes the handler/variable if nothing is using it.
> Otherwise you get a warning specifying where it's used.
>
> Move Handler To
> Copy Handler To
> These allow you to select a new home for the selected handler.
>
> Create Getter and Setter
> Allow external access to a script local variable.
> The handlers will be named after the variable name:
> local ArrayName
> becomes
> command setArrayNameTo pValue
> and
> function ArrayName()
>
> Add Documentation
> Creates documentation for a handler in the form
> /**
> * HandlerName
> * parameters
> * Returns (if a function)
> * returnValues
> */
> The documentation format is stored as a custom property template and can be modified if desired.
>
> Add Test
> Adds a template unit test for the selected handler to a file in the same folder as the stack.
> The file has the same name as the stack with the ".tests" extension.
> The tests file is intended to be run using Ah, Software's TestRunner unit testing stack.
> The unit test format is stored as a custom property template.
> Modifying it will probably cause it to cease functioning.
>
> Convert Global To
> Script Local
> Getter and Setter
> Property
>
> Convert Variable To
> Script Local
> Parameter
> Property
>
> Extract To
> Creates a new handler from the selected block of code in the current script.
>
> Find Orphan Code
> Displays a list of unused local variables and uncalled handlers.
> Double-click a list item to select it in the script editor.
>
> Undo Last Refactor
> There's a full undo first-in-last-out stack mechanism for those oops moments.
> Issues a warning if you attempt to undo changes already saved to disk.
>
> Go Back (contextual menu only)
> Not strictly part of a refactoring process, but since I was reworking the Edit menu anyway...
> After a "Go to definition" call, this gets you back to where you were.
>
> Uploaded to LiveCodeShare:
> http://livecodeshare.runrev.com/stack/934/revRefactor <http://livecodeshare.runrev.com/stack/934/revRefactor>
>
> --
> Mark Wieder
> ahsoftware at gmail.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list