WO2023279913A1 - 代码显示方法、装置、设备、计算机可读存储介质及产品 - Google Patents

代码显示方法、装置、设备、计算机可读存储介质及产品 Download PDF

Info

Publication number
WO2023279913A1
WO2023279913A1 PCT/CN2022/097979 CN2022097979W WO2023279913A1 WO 2023279913 A1 WO2023279913 A1 WO 2023279913A1 CN 2022097979 W CN2022097979 W CN 2022097979W WO 2023279913 A1 WO2023279913 A1 WO 2023279913A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
triggerable
control
user
preset
Prior art date
Application number
PCT/CN2022/097979
Other languages
English (en)
French (fr)
Inventor
刘健
Original Assignee
北京字跳网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字跳网络技术有限公司 filed Critical 北京字跳网络技术有限公司
Publication of WO2023279913A1 publication Critical patent/WO2023279913A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Definitions

  • the embodiments of the present disclosure relate to the field of computer technology, and in particular, to a code display method, device, equipment, computer-readable storage medium, and product.
  • Embodiments of the present disclosure provide a code display method, device, device, computer-readable storage medium, and product to solve the technical problems of low manual code location and acquisition efficiency and high professional requirements for R&D personnel.
  • an embodiment of the present disclosure provides a code display method, including:
  • the target triggerable control In response to the user's trigger operation on the target triggerable control, display code information corresponding to the target triggerable control triggered by the user in the preset second display area, wherein the target triggerable control is the at least one Any of the triggerable controls.
  • an embodiment of the present disclosure provides a code processing and display device, including:
  • a display module configured to display a screenshot interface of the currently displayed content of the target application software to be analyzed in the preset first display area and display at least one triggerable control in the screenshot interface, the triggerable control corresponds to the The target control in the interactive interface of the target application software currently displaying content;
  • a processing module in response to the user's trigger operation on the target triggerable control, displaying in the preset second display area the code information corresponding to the target triggerable control triggered by the user, wherein the target triggerable control is the any triggerable control in the at least one triggerable control.
  • an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes the computer-executed instructions stored in the memory, so that the at least one processor executes the code display method described in the above first aspect and various possible designs of the first aspect.
  • an embodiment of the present disclosure provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the above first aspect and the first Aspects of various possible designs of the code display method.
  • an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the code display method described in the above first aspect and various possible designs of the first aspect .
  • an embodiment of the present disclosure provides a computer program.
  • the computer program When the computer program is executed by a processor, the code display method described in the above first aspect and various possible designs of the first aspect is implemented.
  • This embodiment provides a code display method, device, device, computer-readable storage medium, and product.
  • the code is displayed in the preset first display area.
  • code information is located and acquired through interface interaction.
  • FIG. 1 is a schematic flowchart of a code display method provided by Embodiment 1 of the present disclosure
  • FIG. 2 is a schematic diagram of an interface of a target application software provided by an embodiment of the present disclosure
  • FIG. 3 is an interface interaction diagram provided by an embodiment of the present disclosure.
  • FIG. 4 is another interface interaction diagram provided by an embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart of a code display method provided in Embodiment 2 of the present disclosure.
  • FIG. 6 is a schematic diagram of another interactive interface provided by an embodiment of the present disclosure.
  • FIG. 7 is another interface interaction diagram provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic structural diagram of a code processing and display device provided by Embodiment 3 of the present disclosure.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by Embodiment 4 of the present disclosure.
  • the present disclosure provides a code display method, device, equipment, computer-readable storage medium and product.
  • code display method, device, device, computer-readable storage medium, and product provided by the present disclosure can be used in various code location and acquisition scenarios.
  • the display interface of the application software includes multiple target controls, in order to implement operations such as editing and modifying the target controls, it is necessary to locate and obtain code information of the target controls.
  • the R&D personnel generally analyze the code according to personal experience to obtain the target control code manually. The efficiency is often low, and the requirements for R&D personnel are high.
  • the present disclosure displays a screenshot interface of the currently displayed content of the target application software to be analyzed in the preset first display area and at least one
  • the triggerable control displays the code information corresponding to the target triggerable control in the preset first display area according to the user's trigger operation on the target triggerable control.
  • FIG. 1 is a schematic flowchart of a code display method provided by Embodiment 1 of the present disclosure. As shown in FIG. 1 , the method includes:
  • Step 101 displaying a screenshot interface of the currently displayed content of the target application software to be analyzed in a preset first display area and displaying at least one triggerable control in the screenshot interface, the triggerable control corresponding to the target application
  • the target control in the interactive interface of the software currently displaying content.
  • the execution subject of this embodiment is a code processing and display device, and the code processing and display device can be coupled to the terminal device, so that the code information corresponding to the target triggerable control selected by the user can be located according to the interface interaction operation with the user and Show actions.
  • the code processing and display device can also be coupled to a server, and the server can communicate with the terminal device, so that according to the interface interaction operation between the user and the terminal device, it can be determined that the target selected by the user can trigger the control, and obtain the control related to the terminal device.
  • the target can trigger the code information corresponding to the control and send it to the terminal device for display.
  • the target controls there may be multiple target controls in the interactive interface of the currently displayed content of the target application software to be analyzed, wherein the target controls can realize the interactive operation of the currently displayed content.
  • data processing controls can be set on the display interface.
  • a screenshot interface of the currently displayed content of the target application software to be analyzed may be displayed on the display interface and at least one triggerable control may be displayed in the screenshot interface.
  • the triggerable control corresponds to the target control in the interactive interface of the currently displayed content of the target application software, so as to realize editing and code positioning of the target control.
  • the screenshot interface and the triggerable controls may be displayed in the first display area of the display interface.
  • Step 102 In response to the user's trigger operation on the target triggerable control, display the code information corresponding to the target triggerable control triggered by the user in the preset second display area, wherein the target triggerable control is the any triggerable control in the at least one triggerable control.
  • the user may select a plurality of currently displayed triggerable controls according to actual needs, so as to determine a target triggerable control.
  • the code information corresponding to the target triggerable control can be acquired.
  • the code information corresponding to the target triggerable control is displayed in the preset second display area, wherein the target triggerable control is any triggerable control in the at least one triggerable control.
  • the trigger operation may be any trigger method such as single click, double click, long press, etc., which is not limited in the present disclosure.
  • the first display area and the second display area may be arranged horizontally or vertically.
  • the display areas of the first display area and the second display area may be the same.
  • the display areas of the first display area and the second display area may also be adjusted according to the adjustment operation of the user. This disclosure does not limit this.
  • FIG. 2 is a schematic diagram of the interface of the target application software provided by the embodiment of the present disclosure.
  • the display interface 21 of the short video application software has multiple target controls.
  • the target controls may include a text control 22, a like control 23, a comment control 24, a user identification control 25, and the like.
  • FIG. 3 is an interface interaction diagram provided by an embodiment of the present disclosure. As shown in FIG. 3 , in response to the user’s trigger operation on the target triggerable control 33 in the screenshot interface 32 in the first display area 31 , the target can be triggered in the second display area 34. Code information 35 corresponding to the target triggerable control 33 is displayed.
  • the method firstly displays a screenshot interface of the currently displayed content of the target application software to be analyzed in the preset first display area and at least one
  • the triggerable control according to the trigger operation of the target triggerable control by the user, displays the code information corresponding to the target triggerable control in the preset first display area, so that the code of the target triggerable control currently triggered by the user can be quickly Positioning and acquisition of information improves the efficiency of code acquisition.
  • locating and acquiring code information through interface interaction can realize code locating more conveniently and efficiently.
  • step 101 it also includes:
  • the target code of the target application software is acquired.
  • an analysis button can also be set on the display interface, and the user can initiate an analysis instruction by triggering the analysis button, so as to realize the next step of viewing the target code of the target application software. Specifically, in response to a user's analysis instruction of the target application software to be analyzed, the target code of the target application software can be acquired.
  • step 101 specifically includes:
  • a screenshot interface of the currently displayed content of the target application software to be analyzed is displayed in a preset first display area, and at least one triggerable control is displayed in the screenshot interface.
  • the interactive interface of the content currently displayed by the target application software may be acquired according to the trigger operation. Specifically, a screenshot operation may be performed on the currently displayed content of the target application software to obtain a screenshot interface corresponding to the interactive interface. Further, position information of the target control on the interactive interface may also be determined. Wherein, the position information of the target control may be represented by a coordinate position. Therefore, after the interactive interface and the target control position information are obtained, the screenshot interface of the currently displayed content of the target application software to be analyzed can be displayed in the preset first display area according to the interactive interface and the target control position information, as well as the screenshot interface. At least one triggerable control.
  • step 101 it also includes:
  • At least one triggerable icon corresponding to the target triggerable control is displayed in the preset third display area, and each triggerable icon corresponds to a preset type of operation code of the target triggerable control.
  • the code information corresponding to the target triggerable control may be of different preset types, where the preset types include code declaration type, click event type, layout file type, and the like.
  • At least one triggerable icon corresponding to the target triggerable control displayed in the preset third display area can be changed from a non-triggerable state to becomes triggerable.
  • each of the triggerable icons corresponds to an operation code of a preset type of the target triggerable control.
  • the types of triggerable icons on the interface are fixed. When the user triggers the target triggerable control, the triggerable icon corresponding to the target triggerable control becomes highlighted, indicating that it is in a triggerable state. Click The highlighted triggerable icon can jump to the corresponding type of code, while the triggerable icon that is not associated with the target triggerable control remains untriggerable.
  • the type of the triggerable icon displayed on the interface may change according to the target triggerable control to be triggered.
  • an operation code corresponding to the triggerable icon is displayed in the second display area.
  • FIG. 4 is another interface interaction diagram provided by an embodiment of the present disclosure.
  • the screenshot interface 42 of the currently displayed content of the target application software to be analyzed can be displayed in the preset first display area 41 and the screenshot interface
  • At least one triggerable control 43 is displayed in 42
  • at least one triggerable icon 46 corresponding to the target triggerable control 45 triggered by the user may be displayed in the third display area 44 .
  • the triggerable icon 46 corresponds to the preset type of operation code of the target triggerable control.
  • the preset type includes a code declaration type, a click event type, a layout file type, and the like.
  • step 102 specifically includes:
  • step 102 specifically includes:
  • a preset type of operation code corresponding to the target triggerable control is displayed in the preset second display area.
  • the user can view the code information corresponding to the target triggerable control by performing a trigger operation on the target triggerable control.
  • code information corresponding to the target triggerable control may be displayed in a preset second display area in response to a user's trigger operation on the target triggerable control in the screenshot interface.
  • the target triggerable icon corresponding to the target triggerable control may be triggered.
  • the preset type of operation code corresponding to the target triggerable control can be accurately displayed in the preset second display area.
  • At least one triggerable icon corresponding to the target triggerable control is alienated and displayed in the preset third display area, so as to be able to respond to the user’s request for at least one triggerable icon corresponding to the target triggerable control
  • the triggering operation of the triggerable icon displays the operation code corresponding to the triggerable icon in the second display area, so that the user can check the operation codes of different preset types, so that the user can check the predetermined code more conveniently.
  • Fig. 5 is a schematic flowchart of the code display method provided by Embodiment 2 of the present disclosure. On the basis of Embodiment 1, after step 101, it also includes:
  • Step 501 according to the trigger operation, run multiple pre-embedded analysis codes.
  • Step 502 when the multiple analysis codes are running, determine the position of the code information of the function corresponding to each triggerable control through the function call stack.
  • the analysis code may be pre-embedded in the code. Therefore, after obtaining the user's trigger operation on the data processing control, multiple pre-embedded analysis codes can be run according to the trigger operation. Specifically, when the analysis code is running, the position of the code information of the function corresponding to each triggerable control can be determined through the function call stack. According to the position of the code information corresponding to each triggerable control, the code information of the function corresponding to each triggerable control is obtained and stored, so that after the user's trigger operation on the target triggerable control is obtained, it can be retrieved from the stored triggerable controls. The code information corresponding to the target triggerable control is obtained from the code information of the corresponding function.
  • step 102 specifically includes:
  • a broadcast instruction is sent to a preset software development kit, so that the software development kit acquires code information corresponding to the target triggerable control according to the broadcast instruction.
  • the acquisition of code information may specifically be performed by a preset software development kit.
  • the plug-in can obtain the screenshot interface of the current content, and send a broadcast instruction to the preset software development kit according to the screenshot interface, so that the software development kit can acquire After the broadcast command, the information corresponding to all the interactive controls on the screenshot interface can be obtained according to the broadcast command.
  • the software development kit will serialize and output the code position information obtained when the pre-embedded analysis code is running to the command line , and return the command line to the default plug-in.
  • the default plug-in will analyze the content of the command line, restore the information when the application software is running, and obtain a screenshot of the currently displayed content of the application software, and combine the screenshot and the information when the application software is running Correspondingly, a triggerable control is generated. Therefore, when the user triggers the triggerable control, the preset plug-in will search the file information and line number information provided by the application through the file interface to open the file, that is, jump to the line number corresponding to the code .
  • step 102 specifically includes:
  • the code information corresponding to the target triggerable control is acquired and displayed.
  • the triggerable control may correspond to multiple preset types of functions in the code. Therefore, in response to the user's trigger operation on the target triggerable control, the code information of the function corresponding to the target triggerable control may be Location, get and display the code information corresponding to the target triggerable control.
  • step 101 it also includes:
  • a function icon corresponding to the target control is displayed in the fourth display area.
  • the user can acquire and view the code information by triggering the triggerable control.
  • the triggerable controls can correspond to the function icons in the fourth display area one by one, it is also possible to obtain and view the code information through the trigger operation on the function icons, that is, to trigger the triggerable controls and trigger functions of the screenshot interface.
  • the corresponding function icons have the same effect.
  • the function icons corresponding to the current target controls may be displayed in the preset fourth display area.
  • step 102 specifically includes:
  • code information corresponding to the function icon is displayed in the second display area.
  • the user can select a function icon to be viewed from among the currently displayed function icons according to actual needs to trigger.
  • code information corresponding to the function icon is displayed in the second display area.
  • the code information corresponding to each triggerable function may be obtained and stored by running a plurality of pre-embedded analysis codes, and the code information corresponding to the function icon triggered by the user may be obtained from the stored code information for display.
  • FIG. 6 is a schematic diagram of another interactive interface provided by an embodiment of the present disclosure.
  • a screenshot interface 62 of the currently displayed content of the target application software to be analyzed can be displayed in the preset first display area 61 and a screenshot interface
  • At least one triggerable control 63 is displayed in 62, and a function icon 64 corresponding to the target control may be displayed in the fourth display area 64, wherein the triggerable control corresponds to the triggerable control one by one.
  • code information 66 corresponding to the function icon 65 may be displayed in the second display area.
  • the code display method by displaying the function icons corresponding to the current target controls that can trigger functions in the preset fourth display area, and responding to the trigger operation of any function icon by the user, in the The code information corresponding to the function icon is displayed in the second display area, so that more diversified code viewing operations can be provided to the user on the basis of code viewing through interface interaction, and user experience can be improved.
  • step 102 it also includes:
  • the modified code information is stored in a preset storage path.
  • the user after acquiring the code information corresponding to the target triggerable control, the user can view the code information on the one hand, and modify the code information on the other hand.
  • the code processing and display device can obtain a code modification instruction triggered by a user, perform a modification operation on the code information according to the code modification instruction, and store the modified code information in a preset storage path.
  • the code display method provided by this embodiment can quickly realize the optimized editing operation of the code information by displaying and modifying the code information, and improve the efficiency of code maintenance.
  • step 102 it also includes:
  • control editing interface In response to the trigger operation of the preset editing button by the user, displaying a control editing interface corresponding to the target triggerable control on the display interface, the control editing interface includes attributes to be edited corresponding to the target triggerable control;
  • an attribute editing operation is performed on the target triggerable control.
  • an edit button may be set on the display interface in order to enable the user to perform an edit operation on a target control capable of edit operation by means of interface interaction.
  • the user may perform a trigger operation on the edit button, and in response to the trigger operation, a control editing interface corresponding to the target triggerable control triggered by the user may be displayed on the display interface.
  • the control editing interface may include editable attributes corresponding to the target triggerable control.
  • the control editing interface may include all editable attributes corresponding to the target triggerable control.
  • FIG. 7 is another interface interaction diagram provided by an embodiment of the present disclosure.
  • the control corresponding to the target triggerable control 72 can be displayed on the display interface.
  • An editing interface 73 wherein the control editing interface 73 includes an editable attribute 74 corresponding to the target triggerable control 72 .
  • control editing interface may include editable properties corresponding to the target triggerable control
  • the user can realize the editing operation of the property of the target triggerable control through interface interaction.
  • the control editing interface includes all editable attributes corresponding to the target triggerable control
  • the user can edit all the properties of the target triggerable control at one time through interface interaction, effectively improving the efficiency of control editing.
  • FIG. 8 is a schematic structural diagram of a code processing and display device provided by Embodiment 3 of the present disclosure.
  • the device includes: a display module 81 and a processing module 82, wherein the display module 81 is used to
  • the trigger operation of the set data processing control is to display a screenshot interface of the currently displayed content of the target application software to be analyzed in the preset first display area and display at least one triggerable control in the screenshot interface, and the triggerable control Corresponding to the target control in the interactive interface of the currently displayed content of the target application software; the processing module 82, in response to the user's trigger operation on the target triggerable control, displays the user-triggered target control in the preset second display area.
  • the device further includes: an acquisition module, configured to acquire the target code of the target application software in response to a user's analysis instruction on the target application software to be analyzed.
  • the display module is configured to: respond to the trigger operation of the preset data processing control by the user, acquire the interactive interface of the currently displayed content of the target application software and the interactive interface on the interactive interface. position information of the target control; according to the interactive interface and the position information of the target control, display a screenshot interface of the currently displayed content of the target application software to be analyzed in the preset first display area and display at least A triggerable control.
  • the device further includes: a display module, further configured to display at least one triggerable icon corresponding to the target triggerable control in a preset third display area, Each of the triggerable icons corresponds to an operation code of a preset type of the target triggerable control.
  • the processing module is further configured to: display in the preset second display area in response to the user's trigger operation on the target triggerable control in the screenshot interface.
  • the code information corresponding to the target triggerable control or, the processing module is further configured to: determine whether the target triggerable icon is triggered in response to the user's trigger operation on the target triggerable control in the screenshot interface; If it is determined whether the target triggerable icon is triggered, an operation code of a preset type corresponding to the target triggerable control is displayed in the preset second display area, and the target triggerable icon is the same as the preset type Associated.
  • the preset type includes one or more of code declaration type, click event type, and layout file type.
  • the device further includes: an operating module, configured to run a plurality of pre-embedded analysis codes according to the trigger operation; When the code is running, the position of the code information of the triggerable function corresponding to each triggerable control is determined through the function call stack.
  • the processing module is configured to: send a broadcast instruction to a preset software development toolkit in response to the user's trigger operation on the target triggerable control, so that the software development The toolkit acquires code information corresponding to the target triggerable control according to the broadcast instruction.
  • the processing module is configured to: in response to the user's trigger operation on the target triggerable control, according to the position of the code information of the function corresponding to the target triggerable control, acquire and Display code information corresponding to the target triggerable control.
  • the device further includes: a display module, further configured to display a function icon corresponding to the target control in the fourth display area.
  • the processing module is configured to: display code information corresponding to the function icon in the second display area in response to a user's trigger operation on any function icon .
  • the device further includes: a modification module, configured to store the modified code information in a preset storage path in response to a code modification instruction triggered by a user.
  • the device further includes: a display module, further configured to display on the display interface a control editing interface corresponding to the target triggerable control in response to an editing instruction triggered by a user, so that The control editing interface includes the properties to be edited corresponding to the target triggerable control; the generation module is used to obtain the editing data input by the user on the control editing interface, and generate an editing instruction according to the editing data; the editing module is used to According to the editing instruction, an attribute editing operation is performed on the target triggerable control.
  • a display module further configured to display on the display interface a control editing interface corresponding to the target triggerable control in response to an editing instruction triggered by a user, so that The control editing interface includes the properties to be edited corresponding to the target triggerable control
  • the generation module is used to obtain the editing data input by the user on the control editing interface, and generate an editing instruction according to the editing data
  • the editing module is used to According to the editing instruction, an attribute editing operation is performed on the target triggerable control.
  • Another embodiment of the present disclosure also provides an electronic device, including: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes the computer-executed instructions stored in the memory, so that the at least one processor executes the code display method as described in any of the above embodiments.
  • Another embodiment of the present disclosure also provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when the processor executes the computer-executable instructions, the implementation of any of the above-mentioned embodiments The code display method described above.
  • Yet another embodiment of the present disclosure further provides a computer program product, including a computer program, when the computer program is executed by a processor, the code display method as described in any one of the above embodiments is implemented.
  • the device provided in this embodiment can be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not repeat them here.
  • FIG. 9 is a schematic structural diagram of an electronic device provided by Embodiment 4 of the present disclosure. As shown in FIG. 9 , it shows a schematic structural diagram of an electronic device 900 suitable for implementing an embodiment of the present disclosure.
  • the electronic device 900 may be a terminal device or server.
  • the terminal equipment may include but not limited to mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, PDA for short), tablet computers (Portable Android Device, PAD for short), portable multimedia players (Portable Media Player, referred to as PMP), mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital TVs, desktop computers, etc.
  • PDA Personal Digital Assistant
  • PMP portable multimedia players
  • mobile terminals such as vehicle-mounted terminals (such as vehicle-mounted navigation terminals)
  • fixed terminals such as digital TVs, desktop computers, etc.
  • the electronic device shown in FIG. 9 is only an example, and should not limit the functions and application scope of the embodiment
  • an electronic device 900 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 908 loads the programs in the random access memory (Random Access Memory, RAM for short) 903 to execute various appropriate actions and processes.
  • a processing device such as a central processing unit, a graphics processing unit, etc.
  • RAM Random Access Memory
  • various programs and data necessary for the operation of the electronic device 900 are also stored.
  • the processing device 901, ROM 902, and RAM 903 are connected to each other through a bus 904.
  • An input/output (I/O) interface 905 is also connected to the bus 904 .
  • an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; ), a speaker, a vibrator, etc.
  • a storage device 908 including, for example, a magnetic tape, a hard disk, etc.
  • the communication means 909 may allow the electronic device 900 to perform wireless or wired communication with other devices to exchange data. While FIG. 9 shows electronic device 900 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts.
  • the computer program may be downloaded and installed from a network via communication means 909, or from storage means 908, or from ROM 902.
  • the processing device 901 When the computer program is executed by the processing device 901, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
  • Computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programming read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM or flash memory), optical fiber, portable compact disk read-only memory (Compact Disc Read-Only Memory, referred to as CD-ROM), optical storage device, magnetic storage device, or the above any suitable combination.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • the program code contained on the computer readable medium can be transmitted by any appropriate medium, including but not limited to: electric wire, optical cable, radio frequency (Radio Frequency, RF for short), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device is made to execute the methods shown in the above-mentioned embodiments.
  • Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language—such as "C" or a similar programming language.
  • 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.
  • the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external A computer (connected via the Internet, for example, using an Internet service provider).
  • LAN Local Area Network
  • WAN Wide Area Network
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • 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 they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the unit does not constitute a limitation of the unit itself under certain circumstances, for example, the first obtaining unit may also be described as "a unit for obtaining at least two Internet Protocol addresses".
  • exemplary types of hardware logic components include: Field Programmable Gate Array (Field Programmable Gate Array, FPGA for short), Application Specific Integrated Circuit (ASIC for short), application specific standard product ( Application Specific Standard Product (ASSP for short), System on a Chip (SOC for short), Complex Programmable Logic Device (CPLD for short), etc.
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • a code display method including:
  • the triggerable control corresponds to the target control in the interactive interface of the target application software currently displaying content
  • the target triggerable control In response to the user's trigger operation on the target triggerable control, display code information corresponding to the target triggerable control triggered by the user in the preset second display area, wherein the target triggerable control is the at least one Any of the triggerable controls.
  • a screenshot interface of the currently displayed content of the target application software to be analyzed is displayed in the preset first display area and Before displaying at least one triggerable control in the screenshot interface, the method further includes: acquiring the target code of the target application software in response to a user's analysis instruction for the target application software to be analyzed.
  • displaying the screenshot interface of the currently displayed content of the target application software to be analyzed in the preset first display area includes : Responding to a user's trigger operation on a preset data processing control, acquiring an interactive interface of the currently displayed content of the target application software and position information of the target control on the interactive interface; according to the interactive interface and the position information of the target control, A screenshot interface of the currently displayed content of the target application software to be analyzed is displayed in the preset first display area, and at least one triggerable control is displayed in the screenshot interface.
  • the target triggerable control after responding to the trigger operation of the target triggerable control by the user, it further includes: displaying at least one corresponding to the target triggerable control in a preset third display area Triggerable icons, each of which corresponds to an operation code of a preset type of the target triggerable control.
  • displaying code information corresponding to the target triggerable control triggered by the user in a preset second display area Including: in response to the user's trigger operation on the target triggerable control in the screenshot interface, displaying the code information corresponding to the target triggerable control in the preset second display area, or, the response to the user
  • display the code information corresponding to the target triggerable control triggered by the user in the preset second display area including: responding to the user’s action on the target triggerable control in the screenshot interface trigger operation, determine whether the target triggerable icon is triggered; if it is determined whether the target triggerable icon is triggered, display the preset type of operation code corresponding to the target triggerable control in the preset second display area , the target triggerable icon is associated with the preset type.
  • the preset type includes one or more of a code declaration type, a click event type, and a layout file type.
  • the present disclosure after responding to the trigger operation of the preset data processing control by the user, it further includes: running a plurality of pre-embedded analysis codes according to the trigger operation; When each analysis code is running, the position of the code information of the triggerable function corresponding to each triggerable control is determined through the function call stack.
  • displaying code information corresponding to the target triggerable control triggered by the user in a preset second display area Including: in response to the trigger operation of the target triggerable control by the user, sending a broadcast instruction to a preset software development kit, so that the software development kit obtains the code information corresponding to the target triggerable control according to the broadcast instruction .
  • the method in response to the user's trigger operation on the target triggerable control, displaying code information corresponding to the target triggerable control triggered by the user in a preset second display area, includes: in response to a user's trigger operation on the target triggerable control, acquiring and displaying the code information corresponding to the target triggerable control according to the position of the code information of the function corresponding to the target triggerable control.
  • the preset data processing control after responding to the trigger operation of the preset data processing control by the user, it further includes: displaying a function icon corresponding to the target control in the fourth display area.
  • the displaying the code information corresponding to the target triggerable control triggered by the user in the preset second display area includes: responding to the triggering of any function icon by the user Operation, displaying code information corresponding to the function icon in the second display area.
  • the method further includes: In response to a code modification instruction triggered by a user, the modified code information is stored in a preset storage path.
  • the code information corresponding to the target triggerable control triggered by the user is displayed in the preset second display area in response to the user's trigger operation on any triggerable control, It also includes: in response to the trigger operation of the preset edit button by the user, displaying a control editing interface corresponding to the target triggerable control on the display interface, the control editing interface including the attributes to be edited corresponding to the target triggerable control ; Obtain editing data input by the user on the control editing interface, and generate an editing instruction according to the editing data; perform an attribute editing operation on the target triggerable control according to the editing instruction.
  • a code processing and display device including:
  • the display module is configured to display in the preset first display area a screenshot interface of the currently displayed content of the target application software to be analyzed and display at least A triggerable control, the triggerable control corresponds to the target control in the interactive interface of the target application software currently displaying content;
  • a processing module in response to the user's trigger operation on the target triggerable control, displaying in the preset second display area the code information corresponding to the target triggerable control triggered by the user, wherein the target triggerable control is the any triggerable control in the at least one triggerable control.
  • the device further includes: an acquisition module, configured to acquire an object code of the target application software in response to a user's analysis instruction on the target application software to be analyzed.
  • the display module is configured to: respond to a user's trigger operation on a preset data processing control, acquire an interactive interface of the content currently displayed by the target application software and a target on the interactive interface Control position information; according to the interactive interface and the target control position information, display a screenshot interface of the currently displayed content of the target application software to be analyzed in the preset first display area and display at least one available screenshot interface in the screenshot interface Trigger controls.
  • the device further includes: a display module, further configured to display at least one triggerable icon corresponding to the target triggerable control in a preset third display area, each Each of the triggerable icons corresponds to the operation code of the preset type of the target triggerable control.
  • the processing module is further configured to: in response to the user's trigger operation on the target triggerable control in the screenshot interface, displaying in the preset second display area the The code information corresponding to the target triggerable control, or, the processing module is further configured to: determine whether the target triggerable icon is triggered in response to the user’s trigger operation on the target triggerable control in the screenshot interface; if determined The target activatable icon is triggered, and an operation code of a preset type corresponding to the target activatable control is displayed in the preset second display area, and the target activatable icon is associated with the preset type.
  • the preset type includes one or more of a code statement type, a click event type, and a layout file type.
  • the device further includes: a running module, configured to run a plurality of pre-embedded analysis codes according to the trigger operation; a determination module, configured to run the plurality of analysis codes , the position of the code information of the triggerable function corresponding to each triggerable control is determined through the function call stack.
  • the processing module is configured to: send a broadcast instruction to a preset software development kit in response to a user's trigger operation on a target triggerable control, so that the software development kit The code information corresponding to the target triggerable control is acquired according to the broadcast instruction.
  • the processing module is configured to: in response to the user's trigger operation on the target triggerable control, according to the position of the code information of the function corresponding to the target triggerable control, acquire and display the The target can trigger the code information corresponding to the control.
  • the device further includes: a display module, further configured to display a function icon corresponding to the target control in the fourth display area.
  • the processing module is configured to: display code information corresponding to the function icon in the second display area in response to a user's trigger operation on any function icon.
  • the device further includes: a modification module, configured to store modified code information in a preset storage path in response to a code modification instruction triggered by a user.
  • the device further includes: a display module, further configured to display a control editing interface corresponding to the target triggerable control on the display interface in response to an editing instruction triggered by the user, the control
  • the editing interface includes the properties to be edited corresponding to the target triggerable controls
  • the generation module is used to obtain the editing data input by the user on the control editing interface, and generates editing instructions according to the editing data
  • the editing module is used to The editing instruction is used to edit the properties of the target triggerable control.
  • an electronic device including: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes the computer-executed instructions stored in the memory, so that the at least one processor executes the code display method described in the above first aspect and various possible designs of the first aspect.
  • a computer-readable storage medium stores computer-executable instructions, and when a processor executes the computer-executable instructions, Realize the code display method described in the above first aspect and various possible designs of the first aspect.
  • a computer program product including a computer program.
  • the computer program When the computer program is executed by a processor, the above first aspect and various possibilities of the first aspect can be realized.
  • the code shows the method described in the design.
  • a computer program is provided.
  • the computer program When the computer program is executed by a processor, it implements the codes described in the above first aspect and various possible designs of the first aspect. Show method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

本公开实施例提供一种代码显示方法、装置、设备、计算机可读存储介质及产品,该方法包括:在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件;响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息。从而能够快速地对用户当前触发的目标可触发控件的代码信息的定位以及获取,提高代码获取的效率。通过界面交互的方式进行代码信息的定位以及获取,对当前获取代码信息的用户的专业性要求不高。

Description

代码显示方法、装置、设备、计算机可读存储介质及产品
相关申请交叉引用
本申请要求于2021年7月9日提交中国专利局、申请号为202110776437.4、发明名称为“代码显示方法、装置、设备、计算机可读存储介质及产品”的中国专利申请的优先权,其全部内容通过引用并入本文。
技术领域
本公开实施例涉及计算机技术领域,尤其涉及一种代码显示方法、装置、设备、计算机可读存储介质及产品。
背景技术
在应用软件开发过程中,为了实现对应用软件对应的界面上的界面设计(User Interface Design,简称UI)控件的处理操作,研发人员往往需要对UI控件对应的代码进行定位以及获取。
为了实现对代码的定位以及获取操作,现有技术中一般仅能够依据研发人员对代码的理解人工去定位。但是,由于一个应用软件对应的代码往往需要多个研发人员一同编写,不同研发人员的编写习惯也有所不同,代码的定位往往对研发人员的要求较高,并且由于代码的体量较大,人工的代码定位方法往往效率较低。
发明内容
本公开实施例提供一种代码显示方法、装置、设备、计算机可读存储介质及产品,以解决人工进行代码的定位以及获取效率较低且对研发人员专业要求较高的技术问题。
第一方面,本公开实施例提供一种代码显示方法,包括:
在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件;
响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一个可触发控件中任一可触发控件。
第二方面,本公开实施例提供一种代码处理与显示装置,包括:
显示模块,用于在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件;
处理模块,响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一个可触发控件中任一可触发控件。
第三方面,本公开实施例提供一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
第四方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
第五方面,本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时,实现如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
第六方面,本公开实施例提供一种计算机程序,所述计算机程序被处理器执行时,实现如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
本实施例提供了代码显示方法、装置、设备、计算机可读存储介质及产品,在该方法中,首先在获取到用户对数据处理控件的触发操作之后,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及至少一个可触发控件,根据用户对目标可触发控件的触发操作,在预设的第一显示区域内显示与目标可触发控件对应的代码信息,从而能够快速地对用户当前触发的目标可触发控件的代码信息的定位以及获取,提高代码获取的效率。此外,通过界面交互的方式进行代码信息的定位以及获取。
附图说明
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本公开实施例一提供的代码显示方法的流程示意图;
图2为本公开实施例提供的目标应用软件的界面示意图;
图3为本公开实施例提供的界面交互图;
图4为本公开实施例提供的又一界面交互图;
图5为本公开实施例二提供的代码显示方法的流程示意图;
图6为本公开实施例提供的又一交互界面示意图;
图7为本公开实施例提供的又一界面交互图;
图8为本公开实施例三提供的代码处理与显示装置的结构示意图;
图9为本公开实施例四提供的电子设备的结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
针对上述提及的现有的人工进行代码的定位以及获取效率较低且对研发人员专业要求较高的技术问题,本公开提供了一种代码显示方法、装置、设备、计算机可读存储介质及产品。
需要说明的是,本公开提供代码显示方法、装置、设备、计算机可读存储介质及产品可运用在各种代码定位以及获取的场景中。
由于应用软件的显示界面中包括多个目标控件,为了实现对目标控件的编辑、修改等操作,需要对目标控件的代码信息进行定位以及获取。而现有的代码定位方法一般都是由研发人员根据个人经验对代码进行分析以手动进行目标控件代码的获取。往往效率较低,且对研发人员要求较高。
本公开为了实现对目标控件代码的快速获取,在获取到用户对数据处理控件的触发操作之后,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及至少一个可触发控件,根据用户对目标可触发控件的触发操作,在预设的第一显示区域内显示与目标可触发控件对应的代码信息。
图1为本公开实施例一提供的代码显示方法的流程示意图,如图1所示,该方法包括:
步骤101、在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件。
本实施例的执行主体为代码处理与显示装置,该代码处理与显示装置可耦合于终端设备中,从而能够根据与用户的界面交互操作对用户选中的目标可触发控件对应的代码信息进行定位以及显示操作。
可选地,该代码处理与显示装置也可以耦合于服务器中,该服务器能够与终端设备通信连接,从而能够根据用户与终端设备的界面交互操作,确定用户选中的目标可触发控件,获取与该目标可触发控件对应的代码信息并发送至终端设备进行显示。
在本实施方式中,待分析的目标应用软件当前显示内容的交互界面中可以存在多个目标控件,其中,目标控件能够实现当前显示内容的交互操作。为了方便用户对代码进行查看,可以在显示界面上设置数据处理控件。响应于用户对该数据处理控件的触发操作,可以在显示界面上显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件。其中,可触发控件对应于目标应用软件当前显示内容的交互界面中的目标控件,用以实现对目标控件的编辑和代码定位。其中,具体可以在显示界面内的第一显示区域内显示上述截图界面以及可触发控件。
步骤102、响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一个可触发控件中任一可触发控件。
在本实施方式中,用户可以根据实际需求对当前显示的多个可触发控件进行选择,以确定目标可触发控件。相应地,响应于用户对目标可触发控件的触发操作,可以获取该目标可触发控件对应的代码信息。并在预设的第二显示区域内显示与目标可触发控件对应的代码信息,其中,目标可触发控件为至少一个可触发控件中任一可触发控件。
具体地,该触发操作可以为单击、双击、长按等任意一种触发方式,本公开对此不做限制。此外,第一显示区域与第二显示区域可以横向布局,也可以为纵向布局。
可选地,第一显示区域与第二显示区域的显示面积可以相同。或者,为了提高用户对代码信息的查看体验,还可以根据用户的调整操作对第一显示区域与第二显示区域的显示面积进行调节。本公开对此不做限制。
图2为本公开实施例提供的目标应用软件的界面示意图,如图2所示,以目标应用软件为短视频应用软件举例来说,短视频应用软件的显示界面21上具有多个目标控件。例如,目标控件可以包括文案控件22,点赞控件23,评论控件24,用户标识控件25等。
图3为本公开实施例提供的界面交互图,如图3所示,响应于用户对第一显示区域31内截图界面32内目标可触发控件33的触发操作,可以在第二显示区域34内显示与该目标可触发控件33对应的代码信息35。
本实施例提供的代码显示方法,该方法首先在获取到用户对数据处理控件的触发操作之后,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及至少一个可触发控件,根据用户对目标可触发控件的触发操作,在预设的第一显示区域内显示与目标可触发控件对应的代码信息,从而能够快速地对用户当前触发的目标可触发控件的代码信息的定位以及获取,提高代码获取的效率。此外,通过界面交互的方式进行代码信息的定位以及获取,能够更加方便和高效地实现代码定位。
进一步地,在实施例一的基础上,步骤101之前,还包括:
响应于用户对所述待分析的目标应用软件的分析指令,获取所述目标应用软件的目标代码。
在本实施例中,显示界面上还可以设置有分析按钮,用户可以通过触发该分析按钮发起分析指令,实现下一步对目标应用软件的目标代码的查看。具体地,响应于用户对待分析的目标应用软件的分析指令,可以获取目标应用软件的目标代码。
进一步地,在实施例一的基础上,步骤101具体包括:
响应于用户对预设的数据处理控件的触发操作,获取目标应用软件当前显示内容的交互界面及所述交互界面上的目标控件位置信息;
根据所述交互界面及所述目标控件位置信息,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件。
在本实施例中,在获取到用户对预设的数据处理控件的触发操作之后,可以根据该触发操作,获取目标应用软件当前显示内容的交互界面。具体地,可以对该目标应用软件当前显示内容进行截图操作,获得该交互界面对应的截图界面。进一步地,还可以确定交互界面上的目标控件位置信息。其中,该目标控件位置信息可以通过坐标位置来表示。从而在获取到交互界面以及目标控件位置信息之后,可以根据交互界面以及目标控件位置信息在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在截图界面内显示至少一个可触发控件。
进一步地,在实施例一的基础上,步骤101之后,还包括:
在预设的第三显示区域内显示与所述目标可触发控件对应的至少一个可触发图标,每个所述可触发图标与所述目标可触发控件的预设类型的操作代码对应。
在本实施例中,目标可触发控件对应的代码信息可以为不同的预设类型,其中,该预设类型包括代码声明类型、点击事件类型、布局文件类型等。
因此,为了使用户对其关注的预设类型的代码信息进行进一步地了解,可以在预设的第 三显示区域内显示的与所述目标可触发控件对应的至少一个可触发图标由不可触发状态变为可触发状态。其中,每个所述可触发图标与所述目标可触发控件的预设类型的操作代码对应。在一实施例中,界面上可触发图标的类型为固定的,当用户触发目标可触发控件后,与目标可触发控件对应的可触发图标变为高亮状态,表示其为可触发状态,点击高亮状态的可触发图标可以跳转至对应类型的代码,而与目标可触发控件没有关联的可触发图标仍然保持不可触发状态。在其他实施例中,界面上显示的可触发图标的类型可以根据被触发的目标可触发控件发生变化。
进一步地,可以响应于用户对目标可触发控件对应的至少一个可触发图标的触发操作,在第二显示区域内显示与可触发图标对应的操作代码。
图4为本公开实施例提供的又一界面交互图,如图4所示,可以在预设的第一显示区域41内显示待分析的目标应用软件当前显示内容的截图界面42以及在截图界面42内显示至少一个可触发控件43,以及,可以在第三显示区域44内显示用户触发的目标可触发控件45对应的至少一个可触发图标46。其中,该可触发图标46与目标可触发控件的预设类型的操作代码对应。其中,该预设类型包括代码声明类型、点击事件类型、布局文件类型等。
进一步地,在实施例一的基础上,步骤102具体包括:
响应于所述用户对所述截图界面内目标可触发控件的触发操作,在预设的第二显示区域内显示与所述目标可触发控件对应的代码信息,或者,
可选地,步骤102具体包括:
响应于所述用户对所述截图界面内目标可触发控件的触发操作,确定目标可触发图标是否被触发;
若确定所述目标可触发图标被触发,在预设的第二显示区域内显示与所述目标可触发控件对应的预设类型的操作代码。
在本实施例中,用户可以通过对目标可触发控件的触发操作,实现对目标可触发控件对应的代码信息的查看。具体地,可以响应于用户对截图界面内目标可触发控件的触发操作,在预设的第二显示区域内显示与目标可触发控件对应的代码信息。
可选地,在获取到用户对目标可触发控件的触发操作之后,可以首先确定该目标可触发控件对应的目标可触发图标是否被触发。当目标可触发图标被触发时,可以在预设的第二显示区域内精准地显示目标可触发控件对应的预设类型的操作代码。
本实施例提供的代码显示方法,通过在预设的第三显示区域内异化显示与所述目标可触发控件对应的至少一个可触发图标,从而能够响应于用户对目标可触发控件对应的至少一个可触发图标的触发操作,在第二显示区域内显示与可触发图标对应的操作代码,使得用户对不同预设类型的操作代码进行查看,使得用户可以更加方便地查看预定代码。
图5为本公开实施例二提供的代码显示方法的流程示意图,在实施例一的基础上,步骤101之后,还包括:
步骤501、根据所述触发操作,运行预埋的多个分析代码。
步骤502、在所述多个分析代码运行时,通过函数调用栈确定各可触发控件对应的函数的代码信息的位置。
在本实施例中,为了实现对各可触发控件对应的代码信息的获取操作,可以预先在代码中预埋分析代码。因此,在获取到用户对数据处理控件的触发操作之后,可以根据该触发操 作,运行预埋的多个分析代码。具体地,分析代码在运行时,可以通过函数调用栈确定各可触发控件对应的函数的代码信息的位置。根据各可触发控件对应的代码信息的位置获取各可触发控件对应的函数的代码信息并进行存储,从而后续再获取到用户对目标可触发控件的触发操作之后,可以从存储的各可触发控件对应的函数的代码信息中获取目标可触发控件对应的代码信息。
进一步地,在上述任一实施例的基础上,步骤102具体包括:
响应于用户对目标可触发控件的触发操作,向预设的软件开发工具包发送广播指令,以使所述软件开发工具包根据所述广播指令获取所述目标可触发控件对应的代码信息。
在本实施例中,代码信息的获取具体可以由预设的软件开发工具包来执行。具体地,在获取到用户对目标可触发控件的触发操作之后,可以由插件获取当前内容的截图界面,并根据截图界面向预设的软件开发工具包发送广播指令,从而软件开发工具包在获取到广播指令之后,可以根据该广播指令获取该截图界面上所有交互控件对应的信息,具体的,软件开发工具包会把之前预埋的分析代码运行时得到的代码位置信息序列化输出到命令行中,并将该命令行返回预设插件,由预设插件对命令行内容进行解析,恢复应用软件运行时的信息,同时获得应用软件当前显示内容的截图,把截图和应用软件运行时的信息对应起来,生成可触发控件,由此,当用户触发可触发控件后,预设插件会通过文件接口,搜索应用提供的文件信息和行号信息实现打开文件,即跳转至代码对应的行号。
进一步地,在上述任一实施例的基础上,步骤102具体包括:
响应于用户对目标可触发控件的触发操作,根据所述目标可触发控件对应的函数的代码信息的位置,获取并显示与所述目标可触发控件对应的代码信息。
在本实施例中,可触发控件可以与代码中的多个预设类型的函数对应,因此,响应于用户对目标可触发控件的触发操作,可以根据目标可触发控件对应的函数的代码信息的位置,获取并显示与目标可触发控件对应的代码信息。
进一步地,在上述任一实施例的基础上,步骤101之后,还包括:
在第四显示区域内显示与所述目标控件对应的函数图标。
在本实施例中,用户一方面可以通过对可触发控件的触发操作实现对代码信息的获取与查看。另一方面,由于可触发控件可以与第四显示区域中的函数图标一一对应,还可以通过对函数图标的触发操作实现对代码信息的获取与查看,即触发截图界面的可触发控件与触发对应的函数图标效果相同。
具体地,可以在预设的第四显示区域内显示与当前各目标控件对应的函数图标。
进一步地,在上述任一实施例的基础上,步骤102具体包括:
响应于用户对任一函数图标的触发操作,在所述第二显示区域内显示与所述函数图标对应的代码信息。
在本实施例中,用户可以根据实际需求在当前显示的多个函数图标中选择当前需要查看的函数图标进行触发。响应于用户对任一函数图标的触发操作,在所述第二显示区域内显示与所述函数图标对应的代码信息。具体地,可以通过运行预埋的多个分析代码,获取各可触发函数对应的代码信息并存储,从存储的代码信息中获取与用户触发的函数图标对应的代码信息进行显示。
图6为本公开实施例提供的又一交互界面示意图,如图6所示,可以在预设的第一显示 区域61内显示待分析的目标应用软件当前显示内容的截图界面62以及在截图界面62内显示至少一个可触发控件63,以及,可以在第四显示区域64内显示与目标控件对应的函数图标64,其中,可触发控件与可触发控件一一对应。响应于对任一函数图标64的触发操作,可以在第二显示区域内显示与函数图标65对应的代码信息66。
本实施例提供的代码显示方法,通过在预设的第四显示区域内显示与当前各目标控件对应的可触发函数的函数图标,并响应于用户对任一函数图标的触发操作,在所述第二显示区域内显示与所述函数图标对应的代码信息,从而能够在通过界面交互的方式实现代码查看的基础上,给用户提供更加多样化的代码查看操作,提高用户体验。
进一步地,在上述任一实施例的基础上,步骤102之后,还包括:
响应于用户触发的代码修改指令,将修改后的代码信息存储至预设的存储路径。
在本实施例中,在获取到目标可触发控件对应的代码信息之后,用户一方面可以对该代码信息进行查看,另一方面,用户可以对该代码信息进行修改。相应地,代码处理与显示装置可以获取用户触发的代码修改指令,根据该代码修改指令对代码信息进行修改操作,并将修改后的代码信息存储至预设的存储路径。
本实施例提供的代码显示方法,通过对代码信息进行显示以及修改,从而能够快速地实现对代码信息的优化编辑操作,提高代码维护的效率。
进一步地,在上述任一实施例的基础上,步骤102之后,还包括:
响应于用户对预设的编辑按钮的触发操作,在显示界面上显示与目标可触发控件对应的控件编辑界面,所述控件编辑界面中包括所述目标可触发控件对应的待编辑属性;
获取用户在所述控件编辑界面输入的编辑数据,根据所述编辑数据生成编辑指令;
根据所述编辑指令,对所述目标可触发控件进行属性编辑操作。
在本实施例中,为了使用户能够采用界面交互的方法对能够进行编辑操作的目标控件进行编辑操作,可以在显示界面上设置编辑按钮。用户可以对该编辑按钮进行触发操作,响应于该触发操作,可以在显示界面上显示与用户触发的目标可触发控件对应的控件编辑界面。其中,该控件编辑界面中可以包括目标可触发控件对应的可编辑属性。可选地,控件编辑界面中可以包括目标可触发控件对应的全部可编辑属性。在显示界面上显示控件编辑界面之后,用户可以在该控件编辑界面内相应的可编辑属性对应的区域内输入编辑数据,从而控件编辑装置可以根据用户输入的编辑数据生成编辑指令。控件编辑装置可以根据该编辑指令中的编辑数据,对目标可触发控件的属性进行编辑操作。
图7为本公开实施例提供的又一界面交互图,如图7所示,响应于用户对预设的编辑按钮71的触发操作,可以在显示界面上显示与目标可触发控件72对应的控件编辑界面73,其中,该控件编辑界面73中包括目标可触发控件72对应的可编辑属性74。
本实施例提供的代码显示方法,由于该控件编辑界面中可以包括目标可触发控件对应的可编辑属性,从而用户能够通过界面交互的方式实现对目标可触发控件的属性的编辑操作。进一步地,当控件编辑界面中包括目标可触发控件对应的全部可编辑属性时,用户可以通过界面交互的方式一次性实现对目标可触发控件全部属性的编辑操作,有效地提高控件编辑的效率。
图8为本公开实施例三提供的代码处理与显示装置的结构示意图,如图8所示,该装置包括:显示模块81以及处理模块82,其中,显示模块81,用于响应于用户对预设的数据处 理控件的触发操作,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件;处理模块82,响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一个可触发控件中任一可触发控件。
进一步地,在实施例三的基础上,所述装置还包括:获取模块,用于响应于用户对所述待分析的目标应用软件的分析指令,获取所述目标应用软件的目标代码。
进一步地,在上述任一实施例的基础上,所述显示模块用于:响应于用户对预设的数据处理控件的触发操作,获取目标应用软件当前显示内容的交互界面及所述交互界面上的目标控件位置信息;根据所述交互界面及所述目标控件位置信息,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件。
进一步地,在上述任一实施例的基础上,所述装置还包括:显示模块,还用于在预设的第三显示区域内显示与所述目标可触发控件对应的至少一个可触发图标,每个所述可触发图标与所述目标可触发控件的预设类型的操作代码对应。
进一步地,在上述任一实施例的基础上,所述处理模块还用于:响应于所述用户对所述截图界面内目标可触发控件的触发操作,在预设的第二显示区域内显示与所述目标可触发控件对应的代码信息,或者,所述处理模块还用于:响应于所述用户对所述截图界面内目标可触发控件的触发操作,确定目标可触发图标是否被触发;若确定所述目标可触发图标是否被触发,在预设的第二显示区域内显示与所述目标可触发控件对应的预设类型的操作代码,所述目标可触发图标与所述预设类型相关联。
进一步地,在上述任一实施例的基础上,所述预设类型包括代码声明类型、点击事件类型、布局文件类型中的一种或几种。
进一步地,在上述任一实施例的基础上,所述装置还包括:运行模块,用于根据所述触发操作,运行预埋的多个分析代码;确定模块,用于在所述多个分析代码运行时,通过函数调用栈确定各可触发控件对应的可触发函数的代码信息的位置。
进一步地,在上述任一实施例的基础上,所述处理模块用于:响应于用户对目标可触发控件的触发操作,向预设的软件开发工具包发送广播指令,以使所述软件开发工具包根据所述广播指令获取所述目标可触发控件对应的代码信息。
进一步地,在上述任一实施例的基础上,所述处理模块用于:响应于用户对目标可触发控件的触发操作,根据所述目标可触发控件对应的函数的代码信息的位置,获取并显示与所述目标可触发控件对应的代码信息。
进一步地,在上述任一实施例的基础上,所述装置还包括:显示模块,还用于在第四显示区域内显示与所述目标控件对应的函数图标。
进一步地,在上述任一实施例的基础上,所述处理模块用于:响应于用户对任一函数图标的触发操作,在所述第二显示区域内显示与所述函数图标对应的代码信息。
进一步地,在上述任一实施例的基础上,所述装置还包括:修改模块,用于响应于用户触发的代码修改指令,将修改后的代码信息存储至预设的存储路径。
进一步地,在上述任一实施例的基础上,所述装置还包括:显示模块,还用于响应于用 户触发的编辑指令,在显示界面上显示与目标可触发控件对应的控件编辑界面,所述控件编辑界面中包括所述目标可触发控件对应的待编辑属性;生成模块,用于获取用户在所述控件编辑界面输入的编辑数据,根据所述编辑数据生成编辑指令;编辑模块,用于根据所述编辑指令,对所述目标可触发控件进行属性编辑操作。
本公开又一实施例还提供了一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上述任一实施例所述的代码显示方法。
本公开又一实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上述任一实施例所述的代码显示方法。
本公开又一实施例还提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时实现如上述任一实施例所述的代码显示方法。
本实施例提供的设备,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,本实施例此处不再赘述。
图9为本公开实施例四提供的电子设备的结构示意图,如图9所示,其示出了适于用来实现本公开实施例的电子设备900的结构示意图,该电子设备900可以为终端设备或服务器。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑(Portable Android Device,简称PAD)、便携式多媒体播放器(Portable Media Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图9示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图9所示,电子设备900可以包括处理装置(例如中央处理器、图形处理器等)901,其可以根据存储在只读存储器(Read Only Memory,简称ROM)902中的程序或者从存储装置908加载到随机访问存储器(Random Access Memory,简称RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有电子设备900操作所需的各种程序和数据。处理装置901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。
通常,以下装置可以连接至I/O接口905:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置906;包括例如液晶显示器(Liquid Crystal Display,简称LCD)、扬声器、振动器等的输出装置907;包括例如磁带、硬盘等的存储装置908;以及通信装置909。通信装置909可以允许电子设备900与其他设备进行无线或有线通信以交换数据。虽然图9示出了具有各种装置的电子设备900,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置909从网络上被下载和安装,或者从存储装置908被安装,或者从ROM 902被安装。在该计算机程序被处理装置901执行时,执行本公开实施例的方法 中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的***、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read-Only Memory,简称EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,简称CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行***、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行***、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,简称RF)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方 式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,简称FPGA)、专用集成电路(Application Specific Intergrated Circuit,简称ASIC)、专用标准产品(Application Specific Standard Product,简称ASSP)、片上***(System on a Chip,简称SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,简称CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行***、装置或设备使用或与指令执行***、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体***、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
第一方面,根据本公开的一个或多个实施例,提供了一种代码显示方法,包括:
响应于用户对预设的数据处理控件的触发操作,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件;
响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一个可触发控件中任一可触发控件。
根据本公开的一个或多个实施例,所述响应于用户对预设的数据处理按钮的触发操作,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件之前,还包括:响应于用户对所述待分析的目标应用软件的分析指令,获取所述目标应用软件的目标代码。
根据本公开的一个或多个实施例,所述响应于用户对预设的数据处理控件的触发操作,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面包括:响应于用户对预设的数据处理控件的触发操作,获取目标应用软件当前显示内容的交互界面及所述交互界面上的目标控件位置信息;根据所述交互界面及所述目标控件位置信息,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件。
根据本公开的一个或多个实施例,所述响应于用户对目标可触发控件的触发操作之后,还包括:在预设的第三显示区域内显示与所述目标可触发控件对应的至少一个可触发图标,每个所述可触发图标与所述目标可触发控件的预设类型的操作代码对应。
根据本公开的一个或多个实施例,所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:响应于所述用户对所述截图界面内目标可触发控件的触发操作,在预设的第二显示区域内显示与所述目标可触发控件对应的代码信息,或者,所述响应于用户对任一可触发控件的触发操作, 在预设的第二显示区域内显示与用户触发的目标可触发控件对应的代码信息,包括:响应于所述用户对所述截图界面内目标可触发控件的触发操作,确定目标可触发图标是否被触发;若确定所述目标可触发图标是否被触发,在预设的第二显示区域内显示与所述目标可触发控件对应的预设类型的操作代码,所述目标可触发图标与所述预设类型相关联。
根据本公开的一个或多个实施例,所述预设类型包括代码声明类型、点击事件类型、布局文件类型中的一种或几种。
根据本公开的一个或多个实施例,所述响应于用户对预设的数据处理控件的触发操作之后,还包括:根据所述触发操作,运行预埋的多个分析代码;在所述多个分析代码运行时,通过函数调用栈确定各可触发控件对应的可触发函数的代码信息的位置。
根据本公开的一个或多个实施例,所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:响应于用户对目标可触发控件的触发操作,向预设的软件开发工具包发送广播指令,以使所述软件开发工具包根据所述广播指令获取所述目标可触发控件对应的代码信息。
根据本公开的一个或多个实施例,所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:响应于用户对目标可触发控件的触发操作,根据所述目标可触发控件对应的函数的代码信息的位置,获取并显示与所述目标可触发控件对应的代码信息。
根据本公开的一个或多个实施例,所述响应于用户对预设的数据处理控件的触发操作之后,还包括:在第四显示区域内显示与所述目标控件对应的函数图标。
根据本公开的一个或多个实施例,所述在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:响应于用户对任一函数图标的触发操作,在所述第二显示区域内显示与所述函数图标对应的代码信息。
根据本公开的一个或多个实施例,所述响应于用户触发的编辑指令,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息之后,还包括:响应于用户触发的代码修改指令,将修改后的代码信息存储至预设的存储路径。
根据本公开的一个或多个实施例,所述响应于用户对任一可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的目标可触发控件对应的代码信息之后,还包括:响应于用户对预设的编辑按钮的触发操作,在显示界面上显示与目标可触发控件对应的控件编辑界面,所述控件编辑界面中包括所述目标可触发控件对应的待编辑属性;获取用户在所述控件编辑界面输入的编辑数据,根据所述编辑数据生成编辑指令;根据所述编辑指令,对所述目标可触发控件进行属性编辑操作。
第二方面,根据本公开的一个或多个实施例,提供了一种代码处理与显示装置,包括:
显示模块,用于响应于用户对预设的数据处理控件的触发操作,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件;
处理模块,响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一个可触发控件中任一可触发控件。
根据本公开的一个或多个实施例,所述装置还包括:获取模块,用于响应于用户对所述待分析的目标应用软件的分析指令,获取所述目标应用软件的目标代码。
根据本公开的一个或多个实施例,所述显示模块用于:响应于用户对预设的数据处理控件的触发操作,获取目标应用软件当前显示内容的交互界面及所述交互界面上的目标控件位置信息;根据所述交互界面及所述目标控件位置信息,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件。
根据本公开的一个或多个实施例,所述装置还包括:显示模块,还用于在预设的第三显示区域内异显示与所述目标可触发控件对应的至少一个可触发图标,每个所述可触发图标与所述目标可触发控件的预设类型的操作代码对应。
根据本公开的一个或多个实施例,所述处理模块还用于:响应于所述用户对所述截图界面内目标可触发控件的触发操作,在预设的第二显示区域内显示与所述目标可触发控件对应的代码信息,或者,所述处理模块还用于:响应于所述用户对所述截图界面内目标可触发控件的触发操作,确定目标可触发图标是否被触发;若确定所述目标可触发图标被触发,在预设的第二显示区域内显示与所述目标可触发控件对应的预设类型的操作代码,所述目标可触发图标与所述预设类型相关联。
根据本公开的一个或多个实施例,所述预设类型包括代码声明类型、点击事件类型、布局文件类型中的一种或几种。
根据本公开的一个或多个实施例,所述装置还包括:运行模块,用于根据所述触发操作,运行预埋的多个分析代码;确定模块,用于在所述多个分析代码运行时,通过函数调用栈确定各可触发控件对应的可触发函数的代码信息的位置。
根据本公开的一个或多个实施例,所述处理模块用于:响应于用户对目标可触发控件的触发操作,向预设的软件开发工具包发送广播指令,以使所述软件开发工具包根据所述广播指令获取所述目标可触发控件对应的代码信息。
根据本公开的一个或多个实施例,所述处理模块用于:响应于用户对目标可触发控件的触发操作,根据所述目标可触发控件对应的函数的代码信息的位置,获取并显示与所述目标可触发控件对应的代码信息。
根据本公开的一个或多个实施例,所述装置还包括:显示模块,还用于在第四显示区域内显示与所述目标控件对应的函数图标。
根据本公开的一个或多个实施例,所述处理模块用于:响应于用户对任一函数图标的触发操作,在所述第二显示区域内显示与所述函数图标对应的代码信息。
根据本公开的一个或多个实施例,所述装置还包括:修改模块,用于响应于用户触发的代码修改指令,将修改后的代码信息存储至预设的存储路径。
根据本公开的一个或多个实施例,所述装置还包括:显示模块,还用于响应于用户触发的编辑指令,在显示界面上显示与目标可触发控件对应的控件编辑界面,所述控件编辑界面中包括所述目标可触发控件对应的待编辑属性;生成模块,用于获取用户在所述控件编辑界面输入的编辑数据,根据所述编辑数据生成编辑指令;编辑模块,用于根据所述编辑指令,对所述目标可触发控件进行属性编辑操作。
第三方面,根据本公开的一个或多个实施例,提供了一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
第四方面,根据本公开的一个或多个实施例,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
第五方面,根据本公开的一个或多个实施例,提供了一种计算机程序产品,包括计算机程序,所述计算机程序在被处理器执行时,实现如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
第六方面,根据本公开的一个或多个实施例,提供了一种计算机程序,所述计算机程序被处理器执行时,实现如上第一方面以及第一方面各种可能的设计所述的代码显示方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (18)

  1. 一种代码显示方法,其特征在于,包括:
    在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件;
    响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一个可触发控件中任一可触发控件。
  2. 根据权利要求1所述的方法,其特征在于,所述在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件之前,还包括:
    响应于用户对所述待分析的目标应用软件的分析指令,获取所述目标应用软件的目标代码。
  3. 根据权利要求1或2所述的方法,其特征在于,所述在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件包括:
    响应于用户对预设的数据处理控件的触发操作,获取目标应用软件当前显示内容的交互界面及所述交互界面上的目标控件位置信息;
    根据所述交互界面及所述目标控件位置信息,在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件。
  4. 根据权利要求1-3任一项所述的方法,其特征在于,所述响应于用户对目标可触发控件的触发操作之后,还包括:
    在预设的第三显示区域内显示与所述目标可触发控件对应的至少一个可触发图标,每个所述可触发图标与所述目标可触发控件的预设类型的操作代码对应。
  5. 根据权利要求4所述的方法,其特征在于,所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:
    响应于所述用户对所述截图界面内目标可触发控件的触发操作,在预设的第二显示区域内显示与所述目标可触发控件对应的代码信息,或者,
    所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的目标可触发控件对应的代码信息,包括:
    响应于所述用户对所述截图界面内目标可触发控件的触发操作,确定目标可触发图标是否被触发;
    若确定所述目标可触发图标被触发,在预设的第二显示区域内显示与所述目标可触发控件对应的预设类型的操作代码,所述目标可触发图标与所述预设类型相关联。
  6. 根据权利要求4或5所述的方法,其特征在于,所述预设类型包括代码声明类型、点击事件类型、布局文件类型中的一种或几种。
  7. 根据权利要求1-6任一项所述的方法,其特征在于,所述在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触 发控件之前,还包括:
    根据所述触发操作,运行预埋的多个分析代码;
    在所述多个分析代码运行时,通过函数调用栈确定各可触发控件对应的可触发函数的代码信息的位置。
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:
    响应于用户对目标可触发控件的触发操作,向预设的软件开发工具包发送广播指令,以使所述软件开发工具包根据所述广播指令获取所述目标可触发控件对应的代码信息。
  9. 根据权利要求7所述的方法,其特征在于,所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:
    响应于用户对目标可触发控件的触发操作,根据所述目标可触发控件对应的函数的代码信息的位置,获取并显示与所述目标可触发控件对应的代码信息。
  10. 根据权利要求7-9任一项所述的方法,其特征在于,所述在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件之前,还包括:
    在第四显示区域内显示与所述目标控件对应的函数图标。
  11. 根据权利要求10所述的方法,其特征在于,所述在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,包括:
    响应于用户对任一函数图标的触发操作,在所述第二显示区域内显示与所述函数图标对应的代码信息。
  12. 根据权利要求1-11任一项所述的方法,其特征在于,所述响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息之后,还包括:
    响应于用户触发的代码修改指令,将修改后的代码信息存储至预设的存储路径。
  13. 根据权利要求1-12任一项所述的方法,其特征在于,响应于用户对任一可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的目标可触发控件对应的代码信息之后,还包括:
    响应于用户触发的编辑指令,在显示界面上显示与目标可触发控件对应的控件编辑界面,所述控件编辑界面中包括所述目标可触发控件对应的待编辑属性;
    获取用户在所述控件编辑界面输入的编辑数据,根据所述编辑数据生成编辑指令;
    根据所述编辑指令,对所述目标可触发控件进行属性编辑操作。
  14. 一种代码处理与显示装置,其特征在于,包括:
    显示模块,用于在预设的第一显示区域内显示待分析的目标应用软件当前显示内容的截图界面以及在所述截图界面内显示至少一个可触发控件,所述可触发控件对应于所述目标应用软件当前显示内容的交互界面中的目标控件;
    处理模块,响应于用户对目标可触发控件的触发操作,在预设的第二显示区域内显示与用户触发的所述目标可触发控件对应的代码信息,其中,所述目标可触发控件为所述至少一 个可触发控件中任一可触发控件。
  15. 一种电子设备,其特征在于,包括:至少一个处理器和存储器;
    所述存储器存储计算机执行指令;
    所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如权利要求1-13任一项所述的代码显示方法。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1-13任一项所述的代码显示方法。
  17. 一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序在被处理器执行时,实现根据权利要求1-13任一项所述的代码显示方法。
  18. 一种计算机程序,其特征在于,所述计算机程序被处理器执行时,实现权利要求1-13任一项所述的代码显示方法。
PCT/CN2022/097979 2021-07-09 2022-06-09 代码显示方法、装置、设备、计算机可读存储介质及产品 WO2023279913A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110776437.4 2021-07-09
CN202110776437.4A CN113377365B (zh) 2021-07-09 2021-07-09 代码显示方法、装置、设备、计算机可读存储介质及产品

Publications (1)

Publication Number Publication Date
WO2023279913A1 true WO2023279913A1 (zh) 2023-01-12

Family

ID=77581476

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/097979 WO2023279913A1 (zh) 2021-07-09 2022-06-09 代码显示方法、装置、设备、计算机可读存储介质及产品

Country Status (2)

Country Link
CN (1) CN113377365B (zh)
WO (1) WO2023279913A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377365B (zh) * 2021-07-09 2023-07-18 北京字跳网络技术有限公司 代码显示方法、装置、设备、计算机可读存储介质及产品
CN114356311A (zh) * 2022-01-07 2022-04-15 北京字节跳动网络技术有限公司 代码性能数据的交互方法、装置、介质及电子设备
CN118151917A (zh) * 2024-05-09 2024-06-07 青岛国创智能家电研究院有限公司 用于嵌入式产品开发的方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10223076B1 (en) * 2016-08-29 2019-03-05 The Mathworks, Inc. Generating code based on user interactions with a user interface element in a code editor
CN110489105A (zh) * 2019-07-19 2019-11-22 厦门美柚信息科技有限公司 一种可视化埋点的设置方法、***、设备及其存储介质
CN112817582A (zh) * 2021-03-05 2021-05-18 网易(杭州)网络有限公司 代码处理方法、装置、计算机设备和存储介质
CN113377365A (zh) * 2021-07-09 2021-09-10 北京字跳网络技术有限公司 代码显示方法、装置、设备、计算机可读存储介质及产品
CN113377366A (zh) * 2021-07-09 2021-09-10 北京字跳网络技术有限公司 控件编辑方法、装置、设备、可读存储介质及产品

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9442830B1 (en) * 2014-06-25 2016-09-13 Emc Corporation Automated test coverage analysis, execution and reporting
CN108536607B (zh) * 2018-04-20 2021-06-08 深圳前海微众银行股份有限公司 Ui测试方法、设备及可读存储介质
CN110069404B (zh) * 2019-03-27 2020-08-25 广东高云半导体科技股份有限公司 代码调试方法、装置、设备及介质
CN110399067A (zh) * 2019-07-31 2019-11-01 江苏满运软件科技有限公司 可视化埋点方法、装置、电子设备、存储介质
CN111694758B (zh) * 2020-08-04 2024-01-16 西安闻泰电子科技有限公司 测试代码自动生成方法、装置、计算机设备和存储介质
CN112416363B (zh) * 2020-12-09 2024-03-19 锐捷网络股份有限公司 一种前后端crud代码的生成方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10223076B1 (en) * 2016-08-29 2019-03-05 The Mathworks, Inc. Generating code based on user interactions with a user interface element in a code editor
CN110489105A (zh) * 2019-07-19 2019-11-22 厦门美柚信息科技有限公司 一种可视化埋点的设置方法、***、设备及其存储介质
CN112817582A (zh) * 2021-03-05 2021-05-18 网易(杭州)网络有限公司 代码处理方法、装置、计算机设备和存储介质
CN113377365A (zh) * 2021-07-09 2021-09-10 北京字跳网络技术有限公司 代码显示方法、装置、设备、计算机可读存储介质及产品
CN113377366A (zh) * 2021-07-09 2021-09-10 北京字跳网络技术有限公司 控件编辑方法、装置、设备、可读存储介质及产品

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PAPER CRANE VISION: "Control positioning of WEB automated testing" is based on the unique control attribute positioning of HTML5 controls", BAIDU.COM, 29 August 2020 (2020-08-29), pages 1 - 8, XP093021509, Retrieved from the Internet <URL:https://baijiahao.***.com/s?id=1676325174646320023&wfr=spider&for=pc> [retrieved on 20230207] *

Also Published As

Publication number Publication date
CN113377365B (zh) 2023-07-18
CN113377365A (zh) 2021-09-10

Similar Documents

Publication Publication Date Title
WO2023279913A1 (zh) 代码显示方法、装置、设备、计算机可读存储介质及产品
WO2023279914A1 (zh) 控件编辑方法、装置、设备、可读存储介质及产品
WO2020108339A1 (zh) 一种页面显示位置跳转方法、装置,终端设备及存储介质
WO2021135626A1 (zh) 菜单项选择方法、装置、可读介质及电子设备
WO2022237604A1 (zh) 数据标注方法、装置、设备、计算机可读存储介质及产品
WO2020200173A1 (zh) 文档输入内容的处理方法、装置、电子设备和存储介质
WO2023284437A1 (zh) 媒体文件处理方法、装置、设备、可读存储介质及产品
EP4124052A1 (en) Video production method and apparatus, and device and storage medium
US11934632B2 (en) Music playing method and apparatus
CN109635304B (zh) 多语言***数据处理方法和装置
WO2024046360A1 (zh) 媒体内容处理方法、装置、设备、可读存储介质及产品
WO2024094130A1 (zh) 内容分享方法、装置、设备、计算机可读存储介质及产品
US11449313B2 (en) System and method applied to integrated development environment
US20230409813A1 (en) Document processing method, apparatus and device, and medium
WO2020192246A1 (zh) 终端界面的显示控制方法、装置、存储介质及电子设备
WO2023236875A1 (zh) 页面显示方法、装置、设备、计算机可读存储介质及产品
WO2024001893A1 (zh) 素材展示方法、装置、设备、计算机可读存储介质及产品
WO2023109434A1 (zh) 虚拟资源转移方法、装置、设备、可读存储介质及产品
CN110069186B (zh) 显示应用的操作界面的方法和设备
WO2023072280A1 (zh) 媒体内容发送方法、装置、设备、可读存储介质及产品
CN115268890A (zh) 信息处理方法、装置及电子设备
US12026524B2 (en) Method and apparatus for processing listening resuming of music application, and device
CN109190097B (zh) 用于输出信息的方法和装置
CN112153439A (zh) 互动视频处理方法、装置、设备及可读存储介质
US12032816B2 (en) Display of subtitle annotations and user interactions

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22836668

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE