发明名称 Renaming instances of an entity in a coding environment
摘要 Exemplary embodiments provide computer-implemented methods, computer-readable media, and systems for changing the identifier associated with an entity, such as a variable or function, in a portion of code. During editing, a reference may be maintained that identifies the location of each instance of the entity in the code. When the identifier associated with one instance of the entity is changed, the change in the identifier may be propagated throughout the code to change each instance of the identifier in the code. The identifier may be changed without interrupting the workflow of the user and without the need to change to a separate refactoring mode. In some embodiments, a syntactical analysis may be performed and some or all instances of the identifier may be changed based on one or more rules.
申请公布号 US9588744(B2) 申请公布日期 2017.03.07
申请号 US201414452008 申请日期 2014.08.05
申请人 The MathWorks, Inc. 发明人 Bienkowski Joseph R.;Booker John E.;Avadhanula Srinath;Raghavan Vijay
分类号 G06F9/44;G06F17/24 主分类号 G06F9/44
代理机构 Nelson Mullins Riley & Scarborough LLP 代理人 Nelson Mullins Riley & Scarborough LLP
主权项 1. A method, comprising: storing references to a plurality of variable instance identifiers in storage; detecting a first change made to a first variable instance identifier in programming code while in an editing mode in which the programming code is editable, the first variable instance identifier being from the plurality of variable instance identifiers,the first change being made when the programming code is editable, andthe detecting performed using one or more processors; andapplying at least one rule to automatically make a second change to a second variable instance identifier responsive to the detecting the first change to the first variable instance identifier and based on a context of the first change, the at least one rule specifying when a given change to one of the plurality of variable instance identifiers is propagated to another of the plurality of variable instance identifiers based on the context of the given change, wherein the at least one rule is a predetermined rule, a user-defined rule, a customized version of a predetermined rule or an inferred rule, the second change being made based on the context of the first change,the second variable instance identifier is identified using one of the stored references,the second change made to the second variable instance identifier being made based on the change to the first variable instance identifier, andthe applying performed using the processor without changing from the editing mode to a different mode and without requesting refactoring in the different mode.
地址 Natick MA US
您可能感兴趣的专利