1. Technical Field
The present disclosure relates to computer programming editing software, and more particularly, to a system and method for presenting a visualization of inherited properties and methods of classes in object-oriented languages.
2. Discussion of Related Art
Object-oriented programming (OOP) is a computer programming concept that allows software developers to use objects to design computer applications. Objects are data structures that comprise members (e.g., properties and methods). Languages supporting OOP include C++, Java and Smalltalk. Inheritance is used in OOP. Classes are arranged in a class hierarchy, and inheritance allows software developers to re-use existing classes when writing new classes. Thus, a class may be specified as a subclass of a parent class. A subclass inherits the properties and methods of the parent class, and can also introduce its own properties and methods. A subclass may also overwrite or modify methods inherited from the parent class.
Known editing programs provide a graphical user interface to assist in the development of programs with languages utilizing OOP. These editing programs typically aid software developers by displaying links to method declarations and inherited classes, as well as showing the respective locations of the declarations and classes in the file system.
Therefore, a need exists for a system and method for visualizing inherited code.
According to an embodiment of the present disclosure, a method for presenting inherited members in object-oriented languages comprises forming an aggregated view by a processor. The aggregated view comprises at least one actual member of a current class and at least one inherited member of the current class. The aggregated view is displayed in a single location.
According to an embodiment of the present disclosure, a computer-readable medium embodying instructions executed by a processor to perform a method for presenting inherited members in object-oriented languages comprises forming an aggregated view. The aggregated view comprises at least one actual member of a current class and at least one inherited member of the current class. The aggregated view is displayed in a single location.
According to an embodiment of the present disclosure, a system for presenting inherited members in object-oriented languages comprises a plurality of files storing information corresponding to a plurality of classes in a class hierarchy, a model module for creating an aggregated view based on the plurality of classes in the class hierarchy, wherein the aggregated view comprises at least one actual member of a current class and at least one inherited member of the current class, a controller module for updating the model module based on user gestures, and a view module for displaying the aggregated view in a single location.
Preferred embodiments of the present disclosure will be described below in more detail, with reference to the accompanying drawings:
According to an embodiment of the present disclosure, all methods and properties of inherited classes are displayed in a single, aggregated view corresponding to the current subclass. This can be realized by flattening a class hierarchy and displaying the hierarchy in a single location, such that all inherited members (e.g., methods and properties) of the current class are visible at once. For example,
In
According to an embodiment of the present disclosure illustrated in
According to an embodiment of the present disclosure, the representation of inherited methods and properties in the editor view can be visually enhanced further by utilizing different colors or different shades of colors for different inheritance levels. For example, a view of a class inheriting members from all of the classes in the class hierarchy 100 in
According to an embodiment of the present disclosure, filtering options may be provided, allowing a user to configure the level of shown content and inheritance. For instance, a user may utilize filtering options to filter out members of classes from libraries or the run-time environment. For example, referring to
According to an embodiment of the present disclosure, for methods that utilize super( ) and overwrite an inherited method, the implementation of the inherited method can be shown inline. This feature works recursively. An additional option can hide the source code for the super implementation. This is illustrated in
According to an embodiment of the present disclosure, the system and method described herein may be implemented via stand-alone software or via an editor extension. Further, it is to be appreciated that embodiments of the present disclosure may be utilized with software having editing functionality, as well as software having only viewing functionality.
Exemplary embodiments of the present disclosure may be realized taking into consideration implementation-specific decisions to achieve a specific goal(s), such as compliance with system-related and business-related constraints. Moreover, it will be appreciated that such a development effort might be complex and time-consuming, but would nevertheless be a routine undertaking for those of ordinary skill in the art having the benefit of this disclosure.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or computer program product. Accordingly, aspects of the present disclosure 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 disclosure may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied 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. 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, 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), 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, electromagnetic, 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 disclosure 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 disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to exemplary embodiments of the disclosure. 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 or other programmable data processing apparatus, 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.
It is to be understood that embodiments of the present disclosure may be implemented in various forms of hardware, software, firmware, special purpose processors, or a combination thereof. In one embodiment, a method for low complexity signal analysis may be implemented in software as an application program tangibly embodied on a computer readable medium. The application program may be uploaded to, and executed by, a processor comprising any suitable architecture.
Referring to
The computer platform 501 also includes an operating system and micro-instruction code. The various processes and functions described herein may either be part of the micro-instruction code or part of the application program (or a combination thereof) which is executed via the operating system. In addition, various other peripheral devices may be connected to the computer platform such as an additional data storage device and a printing device.
It is to be further understood that, because some of the constituent system components and method steps depicted in the accompanying figures may be implemented in software, the actual connections between the system components (or the process steps) may differ depending upon the manner of programming. Given the teachings of the present disclosure provided herein, one of ordinary skill in the related art will be able to contemplate these and similar implementations or configurations.
The flowchart and block diagrams 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 disclosure. 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.
Having described exemplary embodiments for a system and method for visually presenting inherited members in object-oriented languages, it is noted that modifications and variations can be made by persons skilled in the art in light of the above teachings. It is therefore to be understood that changes may be made in embodiments of the present disclosure which are within the scope and spirit of the disclosure as defined by the appended claims. Having thus described the disclosure with the details and particularity required by the patent laws, what is claimed and desired protected by Letters Patent is set forth in the appended claims.