A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The embodiments disclosed within this specification relate to computer programming. More particularly, the embodiments relate to integrated development environments (IDE's).
An IDE is a software application that provides comprehensive facilities to computer programmers that are used for software development. An IDE typically present a single application in which the computer program is being developed. This application typically provides many features for authoring, modifying, compiling, deploying and debugging software. In this regard, an IDE normally includes a source code editor, a compiler and/or an interpreter, build automation tools, and a debugger. These tools provide a great deal of functionality designed to improve the efficiency of the computer programmer when developing an application.
An IDE abstracts the configuration necessary to piece together command line utilities in a cohesive unit, which theoretically reduces the time to learn a language, and increases productivity of a computer programmer (e.g., a software developer). It is also thought that the tight integration of development tasks can further increase productivity. For example, code can be compiled while being written, providing instant feedback on syntax errors. In addition, many IDE's allow the programmer to view references to variables used in a computer program, and show where the variables occur in a given class, typically by highlighting their locations next to a scrollbar in an editor. Other tools allow the programmer view where a variable is referenced throughout an application.
An embodiment of the present invention relates to, within a system comprising a processor and a memory, a method for, within integrated development environment (IDE), presenting a custom view in the IDE based on a variable selection. The method can include selecting a first instance of the first variable in a first portion of program code. Via the processor, the program code can be searched to identify at least a second instance of the first variable in at least a second portion of the program code. Further, via the processor, the custom view can be presented in the IDE to present at least the first portion of the program code and the second portion of the program code based on the identification of the first variable in the second portion of the program code.
Another embodiment of the present invention relates to, within a system comprising a processor and a memory, a method for, within integrated development environment (IDE), presenting a custom view in the IDE based on a variable selection. The method can include selecting a first instance of a first variable in a first portion of program code, identifying a number of levels of program code that influence the first variable, and identifying other portions of the program code that include variables within the identified number of levels that influence the first variable. Further, via the processor, the custom view can be presented in the IDE to present at least the first portion of the program code and the other portions of the program code.
Yet another embodiment of the present invention can include a computer program product including a computer-readable storage medium having program instructions that, when executed, causes a machine to perform the various steps and/or functions described herein.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” “module” or “system”. Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied, e.g., stored, thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium (e.g., a computer readable storage device). A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk drive (HDD), a solid state drive (SSD), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber, cable, RF, etc., or any suitable combination of the foregoing. Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the “C” programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider).
Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer, other programmable data processing apparatus, or other devices create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks.
Aspects of the present invention relate to, within an integrated development environment (IDE) executed by a processor, presenting a custom view in the IDE based on a variable selection. More particularly, an instance of the variable in a first portion of the program code can be selected. The program code can be searched to identify other instances of the variable in the program code. A current view of the IDE then can be modified to present the first portion and other portions of the program code that contain the variable. Portions of the program code not relevant to the selected variable need not be presented in the current view. Accordingly, the user will be presented only portions of the program code that relate to the variable of interest. The current view can be modified in a number of ways, as will be described herein. A suitable algorithm can be implemented to perform the modifications to the current view.
In operation, an instance of a selected variable 102 (e.g., variable “b”) within a portion 104 of program code can be selected. The program code can be source code for a computer program, such as a computer application, or any other type of program code. In illustration, the user can select the variable 102 with a cursor of the user interface, for example by navigating the cursor to the variable 102 using a mouse, keyboard, stylus or touch screen. The variable 102 also can be selected using outline tools, selected based on a user entry of the variable 102 into a search field, or selected in any other suitable manner.
In response to the variable 102 being selected, the program code can be searched to identify other instances of the variable 102 within the program code. In illustration, another instance of the variable 102 within another portion of the program code can be identified. In response to identifying another instance of the same variable 102 in the other portion of the program code, the current view 100 within the IDE can be modified or changed to present both the first portion 104 and at least the other portion of the program code in a custom view based on the identification of the first variable in the second portion of the program code. Other portions of the program code need not be displayed; such portions can be hidden from view. In another arrangement, the other portions of the program code can be deemphasized. For instance, such portions of code can be presented with a lightened font color.
Another instance of the same variable means a variable that has the same meaning. For example, if a variable is declared as a field or global variable, that variable will have the same meaning within the different portions of the program code. In illustration, consider the following program code:
Here, the variable “b” is declared globally. Accordingly, the variable “b” in the “methodTwo” portion of the program code is another reference to the same variable “b” used in the “methodOne” portion of the program code.
If, however, a first variable has the name, e.g., “b”, but a second variable unrelated to the first variable also has the name “b” (e.g., the first and second variables represent different values, objects or other entities are contained in unrelated portion of program code, respectively), then the second variable would not be the same as the first variable. This may be the case when a variable is declared locally within individual methods or functions. In illustration, consider the following program code:
Here, two different variables with the variable name “b” are declared locally within two different methods. Accordingly, the variable “b” in the “methodTwo” portion of the program code is not another instance of the variable “b” in the “methodOne” portion of the program code; they are different variables.
Moreover, the name assigned to a variable may change among related portions of program code. For example, the name of a variable assigned to an entity may change as the variable transitions through the system. Thus, a variable may be referred to by different names in different places within the program code, even though these references are to the same entity. The present invention can recognize different instances of the same variable when the different instances are assigned different variable names, and process the different instances of the variable as described herein. In illustration, consider the following program code:
Here, the variable “anyname” is declared locally within the “methodTwo” method, but passed to the “methodOne” method as variable “x”. Accordingly, the variable “anytime” in the “methodTwo” portion of the program code is another instance of the variable “x” in the “methodOne” portion of the program code.
In one arrangement, the user can be provided a means to toggle between the view 200 and a view (not shown) which includes portions of code hidden or deemphasized in the view 200. Such means can include, for example, a toggle button. The user also can change between the views using one or more keystrokes, by selecting a menu item, or the like.
In one aspect of the invention, the portion of code in which the variable 102 is declared or instantiated can be presented at the top, or close to the top, of the view 200. For example, if the variable 102 is declared or instantiated in the first portion 104, the first portion 104 can be presented at the top of the view 200. Notwithstanding, the second portion 206 can be presented above the first portion 104, or elsewhere with the view 200. In one arrangement, if other lines of code are present in the program code between the first portion 104 and the second portion 206, such lines of code need not be presented in the view 200. In such case, a visual indicator 208 can be presented within the view 200 to indicate that the second portion 206 is not immediately adjacent to the first portion 104 in the program code. Moreover, the indicator 208 also can presented within portions of program code to indicate where lines of code that do not influence the variable 102 are contained in the program code, but not shown. In the present example ellipses are depicted, though any other suitable indicator can be presented.
In one embodiment, if the portions 104, 206 of program code are presented in an order that is different than the order in which the portions 104, 206 are contained in the program code, arrows or other symbols can be presented in the view to indicate such. For instance, an arrowed symbol 210 can be presented between the portions 104, 206.
A determination can made as to whether the variable 102 is influenced by at least a second variable. For example, if the variable 102 is influenced by at least a second variable “t” 222, the second portion 206 of the program code can be presented to include lines of code 224 that influence the second variable 222.
In one embodiment, a determination can be made as to whether the second portion 206 of the program code contains a programming loop that includes the first variable 102 and/or the second variable 224. When the first variable 102 and/or the second variable 224 is contained within a programming loop, the second portion 206 of the program code can be presented so as to include lines of code for the programming loop, for example beginning with a start line of code 230 and ending with an end line of code 232. When the first variable 102 and/or the second variable 224 is contained within a programming loop, and the first variable 102 and/or the second variable 224 effects a termination condition of the programming loop, the second portion 206 of the program code can be presented so as to include each of the lines of code for the entire programming loop.
If the variable 102 is included in a condition, then the line of code containing the condition statement need only be presented in the view 200. If, however, the variable 102 is referenced in a condition evaluator, then the entire condition can be presented in the view 200. This basic logic also can be applied to any other constructs that share similar patterns, for example try/catch, synchronize, branches, events, etc.
The custom view 200 in the IDE further can present comment lines that occur directly before code segments presented in the program code. In illustration, a comment line 240 that occurs directly before program code in the second portion 206 and a comment line 242 that occurs directly after program code in the second portion 206 can be presented in the view 200.
Further, the custom view 200 also can include import or include lines 244 relevant to lines of code within the portions 104, 206, 252, 256 of the program code. Container methods and classes/inner classes in which the variables are referenced, or to which the variables are passed, also can be presented in the view 200, for example in the portion 256 of the program code.
The algorithm that presents the custom view 200 can be recursive in nature so as to identify any desired levels of program code that influence the variable 102. The number of desired levels can be user selectable. In illustration, if a depth of variable search is set to “0”, which can be a default setting, the algorithm need only identify portions of the program code that directly influence the variable 102 (e.g., portions of the program code in which the operations are directly performed on the variable 102). If, the depth of the search is set to a higher value, portions of code that influence other variables that influence the variable 102 also can be identified. In other words, the search can be extended to identify other variables that indirectly influence the variable 102. As used herein, a first variable is influenced by a second variable if the value assumed by the first variable depends, at least in part, on the value assumed by the second variable.
For example, if the depth of search is set to “1”, a determination can be made as to whether the second variable 222 is modified by at least a third variable 250, for example a variable “a”. When the second variable 222 is modified by at least the third variable 250, the custom view 200 of the IDE can be modified to present at least a third portion 252 of the program code. The third portion 252 of the program code can include lines of code that influence the third variable 250. The third portion 252 of the program code further can include a line of code 254 where the third variable 250 is declared or instantiated.
Since the algorithm is recursive, the depth of the search can be set to any other values in order to identify further levels of program code that indirectly influence the variable 102. For example, if the depth of the search is set to “2”, portions of the program code that influence the variable “a” 250 also can be identified. For example, a portion of program code 256 can be presented.
One or more visual indicators 260 can be presented within the view 200 of the IDE to visually distinguish the variable 102 from other alphanumeric text in the program code. For instance, the visual indicators 260 can highlight one or more instances of the variable 102, provide a different color of font for the variable 102, or visually distinguish the variable 102 in another suitable manner. Further, the line of code 262 where the variable 102 is declared or instantiated in the program code can be visually distinguished from other lines of code, for example using a visual indicator 264. The line of code 262 can be presented at a top, or near a top, of the view 200, though this need not be the case.
One or more variables that directly influence the variable 102, such as the variable 222 and a variable “x” 266, and/or one or more variables that are directly influenced by the variable 102, also can be visually distinguished from other alphanumeric text in the program code. For example, indicators 268, 270 can be presented to visually distinguish the variables 222, 266. Further, lines of code 230, 274 where the variables 222, 266 are declared or instantiated also can be visually distinguished from other alphanumeric text in the program code, for example using indicators 276, 278.
The visual indicators 264, 268, 270, 276, 278 can be presented in the same style as the indicator 260, but this need not be the case. For example, if highlighting is applied to distinguish the variables 102, 222 and 266, and the lines of code 230, 262 and 274, the visual indicators 260, 264, 268, 270, 276, 278 can be presented in different colors.
In an embodiment in which multiple files are open in the IDE, for example as separate views presented in different tabs, then each of the views can be modified as described herein to present custom views. In illustration, if the variable 102 is contained in three different files, each of which are presented in a separate view, then the view modification algorithm can be applied to each of the views when the variable 102 is selected. The view modification algorithm can modify the existing views or present new views. Alternatively, an option can be provided to the user to select which views are to be modified or to select views for which new custom views are to be presented.
In response to the variable 102 of
In the view 500, portions of the program code that are not identified as being related to the selected variable need not be presented in the tree 402. In illustration, the view 500 need not present portions 404-408 of the program code within the tree 402. In such case, one or more visual indicators 502 can be presented within the view 500 to indicate portions of the program code that are not immediately adjacent to one another in the view 400. In the present example ellipses are depicted, though any other suitable indicators can be presented.
In another embodiment, the view 400 of
The memory devices 810 can include one or more physical memory devices such as, for example, local memory 820 and one or more bulk storage devices 825. Local memory 820 refers to random access memory or other non-persistent memory device(s) generally used during actual execution of the program code. The bulk storage device(s) 125 can be implemented as a machine-readable storage device, such as hard drive, solid state drive, or other persistent data storage device. The system 800 also can include one or more cache memories (not shown) that provide temporary storage of at least some program code in order to reduce the number of times program code must be retrieved from the bulk storage device 825 during execution.
Input/output (I/O) devices such as keyboard 830, a pointing device 835, and a display 840 also can be coupled to the system 800. The I/O devices can be coupled to the system 800 either directly or through intervening I/O controllers. The I/O devices can receive user inputs into the system 800 and to the user information generated by the system 800.
As pictured in
The flowcharts and block diagram in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
The corresponding structures, materials, acts, and equivalents of all means or step plus function elements in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.
This application is a Continuation of U.S. application Ser. No. 13/102,273, filed on May 6, 2011.
Number | Name | Date | Kind |
---|---|---|---|
6314559 | Sollich | Nov 2001 | B1 |
6502233 | Vaidyanathan et al. | Dec 2002 | B1 |
6854111 | Havner | Feb 2005 | B1 |
7730466 | Wilson | Jun 2010 | B2 |
8959479 | Armstrong et al. | Feb 2015 | B2 |
20060136870 | Wilson et al. | Jun 2006 | A1 |
20080313208 | Hourselt et al. | Dec 2008 | A1 |
20120284689 | Armstrong et al. | Nov 2012 | A1 |
Entry |
---|
“Code Assistance in the Netbeans IDE Java Editor: A Reference Guide,” [online] Netbeans.org, Oracle Corporation © 2011, and/or its affiliates, [retrieved Jan. 24, 2011] retrieved from the Internet: <http://netbeans.org/kb/docs/java/editor-codereference.html>, 11 pg. |
“Editing JavaScript,” [online] Netbeans.org, [retrieved Jan. 24, 2011] Oracle Corporation © 2011, and/or its affiliates, retrieved from the Internet: <http://netbeans.org/kb/65/ide/javascript-editor.html>, 9 pg. |
“Major PHP IDE Features Available in PhpED,” [online] NuSphere Corp. © 2000-2011 [retrieved Jan. 24, 2011] retrieved from the Internet: <http://www.nusphere.com/products/phped—features.htm>, 2 pg. |
U.S. Appl. No. 13/102,273, Non-Final Office Action, Aug. 8, 2013, 11 pg. |
U.S. Appl. No. 13/102,273, Final Office Action, Feb. 2, 2014, 17 pg. |
U.S. Appl. No. 13/102,273, Notice of Allowance, Oct. 7, 2014, 10 pg. |
Number | Date | Country | |
---|---|---|---|
20150160930 A1 | Jun 2015 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13102273 | May 2011 | US |
Child | 14597603 | US |