CN-116244018-B - Window control arrangement method, system and storage medium for code reading
Abstract
The invention relates to the technical field of code development, in particular to a window control arrangement method, a system and a storage medium for code reading, wherein the method comprises the steps of performing determinant layout on code editors on a display page, wherein a plurality of code editors are arranged in each column, and a spacing column is arranged between the two columns; if any code editor is used as a reference code editor, a new code editor is opened, a connection relation exists between the reference code editor and the new code editor, and the insertion position of the new code editor is obtained according to the position of the reference code editor and the current connection relation of the column of the reference code editor. The scheme performs determinant layout on the code editor, and can perform optimized insertion so as to facilitate reading and improve reading efficiency.
Inventors
- Guo Pengshan
Assignees
- 重庆市绝学网络科技有限责任公司
Dates
- Publication Date
- 20260508
- Application Date
- 20230129
Claims (8)
- 1. The window control arrangement method for code reading is characterized by comprising the following steps: Performing determinant layout on the code editors on the display page, wherein a plurality of code editors are arranged in each column, and a spacing column is arranged between the two columns; If the operation signal is obtained, the code editor performs insertion operation, movement operation, sliding operation, stretching operation or zooming operation according to the operation signal; The operation signals comprise a code file opening signal and a code element jump signal; if the code file opening signal is obtained, performing an inserting operation, and opening a new code editor without taking any code editor as a reference code editor so as to display the content of the selected code file; If the code element jump signal is obtained, jump content is obtained according to the selected code element, whether the jump content is in an opened code editor or not is judged, if yes, a connection relation with the selected code element as a starting point and the jump content as an ending point is added, if not, an inserting operation is carried out, the code editor with the selected code element is taken as a reference code editor, a new code editor is opened, the jump content is displayed, and the connection relation with the selected code element as the starting point and the jump content as the ending point is added; The inserting operation comprises that if any code editor is used as a reference code editor, a new code editor is opened, a connection relation exists between the reference code editor and the new code editor, and the inserting position of the new code editor is obtained through a pre-estimated inserting position method, wherein the pre-estimated inserting position method is used for obtaining the inserting position according to the position of the reference code editor and the current connection relation of the column in which the reference code editor is positioned, and the pre-estimated inserting position method comprises the following steps: Acquiring all connection relations of all code editors in a column where a reference code editor is located; Screening the connection relation according to the connection relation to obtain an effective connection, wherein the effective connection is the next row of the row of which the starting point is the row of which the end point of the connection is located; Comparing the position information of the selected code element with the position information of the starting point of the effective connecting line, dividing the effective connecting line into an upper half connecting line and a lower half connecting line, wherein the position information of the starting point of the upper half connecting line is smaller than the position information of the selected code element, and the position information of the starting point of the lower half connecting line is larger than the position information of the selected code element; pairing the upper half connecting line and the lower half connecting line in pairs to form a plurality of clamping pairs; screening the clamping pair to obtain an effective clamping pair, wherein the effective clamping pair is a clamping pair with two connecting lines without crossing; Judging whether an effective clamping pair is obtained, if so, obtaining the effective clamping pair with the smallest distance between the starting point and the selected code element in the effective clamping pair as an effective clamping pair of the inserting position, taking the next position of the column where the end point of the connecting line of the upper half part of the effective clamping pair of the inserting position is positioned as the inserting position, and if not, taking the preset position as the inserting position.
- 2. The method for arranging window controls for code reading according to claim 1, wherein the inserting operation further comprises opening a new code editor if any code editor is not used as a reference code editor, and the insertion position of the new code editor is a preset position of a preset column.
- 3. The method for arranging window controls for code reading according to claim 1, wherein the operation signal further comprises a moving operation signal; If the moving operation signal is acquired, moving operation is performed, and the selected code editor is moved to any position of any column according to the moving operation signal.
- 4. The method for arranging window controls for code reading according to claim 1, wherein the operation signal further comprises a sliding operation signal; If the sliding operation signal is obtained, sliding operation is carried out, the selected code editors are controlled to slide in the corresponding columns according to the sliding operation signal, only the intervals among the code editors are changed, and all the code editors are not overlapped; the code editors slide in the corresponding columns, and if the sliding distance is smaller than or equal to the interval between adjacent code editors in the same column, the positions of the other code editors in the same column are not changed; If the sliding distance is larger than the interval between adjacent code editors in the same column, the code editors in the sliding direction are pushed to slide at corresponding positions.
- 5. The method for arranging window controls for code reading according to claim 1, wherein said operation signals further include an upper and lower side stretching operation signal and a space bar moving operation signal; if the upper and lower side stretching operation signals are obtained, performing upper and lower side stretching operation, moving the selected side according to the upper and lower side stretching operation signals, and adjusting the height of the code editor; The edges of the code editors move, and if the moving distance is smaller than or equal to the interval between adjacent code editors in the same column, the positions of the other code editors in the same column are not changed; if the moving distance is larger than the interval between adjacent code editors in the same column, pushing the code editors in the moving direction to move the corresponding positions; If the interval bar moving operation signal is acquired, the left and right stretching operation is performed, the selected interval bar is moved according to the interval bar moving operation signal, and the width of all code editors in the corresponding column is adjusted.
- 6. The method for arranging window controls for code reading according to claim 1, wherein the operation signal further comprises scaling the operation signal; and if the scaling operation signal is obtained, scaling operation is carried out, and all code editors are controlled according to the scaling operation signal to carry out corresponding scale amplification or reduction.
- 7. A window control arrangement system for code reading, characterized in that the window control arrangement method for code reading according to any one of claims 1 to 6 is employed.
- 8. A window control arrangement storage medium for code reading, said storage medium having stored thereon a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the window control arrangement method for code reading as claimed in any one of claims 1 to 6.
Description
Window control arrangement method, system and storage medium for code reading Technical Field The invention relates to the technical field of code development, in particular to a window control arrangement method, a system and a storage medium for code reading. Background When reading source code, analyzing project body logic structures, or looking at specific function implementation mechanisms, it is necessary to jump through a large number of files or folders because different functions are distributed in different files and or folders according to a certain organization. In the prior art, different code files and codes can be displayed only through tab pages or a screen splitting mode, and when a user reads a source code, analyzes a project main logic structure or checks a specific function, the user is inconvenient to use, and because the problems that display is not visual enough, effective information displayed is not abundant enough and the like exist, the user needs to repeatedly switch the code files, so that inconvenience is caused to the user to read, and the reading efficiency of the user is limited. And when a new code file is opened in the display page, the new window is arranged randomly, so that the user is not facilitated to view, and when the opened code files are increased, the user needs to spend time searching for the required code files in a plurality of windows again, and the new window can cause shielding or reading influence on the opened window, so that the reading efficiency of the user is further influenced. Disclosure of Invention One of the purposes of the present invention is to provide a window control arrangement method for code reading, which performs determinant layout on a code editor, and performs optimized insertion so as to facilitate reading and improve reading efficiency. The invention provides a basic scheme I, which is a window control arrangement method for code reading and comprises the following contents: Performing determinant layout on the code editors on the display page, wherein a plurality of code editors are arranged in each column, and a spacing column is arranged between the two columns; If the operation signal is obtained, the code editor performs insertion operation, movement operation, sliding operation, stretching operation or zooming operation according to the operation signal; If any code editor is used as a reference code editor, a new code editor is opened, a connection relation exists between the reference code editor and the new code editor, and the insertion position of the new code editor is obtained through a pre-estimated insertion position method, wherein the pre-estimated insertion position method is used for obtaining the insertion position according to the position of the reference code editor and the current connection relation of the column in which the reference code editor is positioned. The basic scheme one has the beneficial effects that determinant layout is carried out on the code editors, a plurality of code editors are arranged in each column, and a space column is arranged between the two columns, so that a plurality of code editors can be displayed on the same display page to display a plurality of code files, the back and forth switching of the plurality of files is avoided, and the memory burden of a user when reading source codes is reduced; And according to different acquisition operation signals, different operations can be performed on the code editors in the display page, including but not limited to an insertion operation, a moving operation, a sliding operation, a stretching operation or a scaling operation, wherein the insertion operation is not a single operation of directly inserting the code editors at preset positions, which has serious influence on the current layout of the display page, but when the insertion operation is performed, if any code editor is used as a reference code editor, a new code editor is opened, a connection relationship exists between the reference code editor and the new code editor, and the insertion position of the new code editor is acquired through a pre-estimated insertion position method, wherein the pre-estimated insertion position method is the operation of acquiring the insertion position according to the position of the reference code editor and the current connection relationship of the column in which the reference code editor is positioned. The connection relation exists between each newly opened code editor and each newly opened reference code editor, and the connection relation can be used for displaying connection generated on a display page in an imaging mode, so that a user can intuitively know the relation between the newly opened code editor and each newly opened reference code editor according to the requirements in the reading process, namely the relation between codes (in the reference code editors) and the jump content (the new code editors) of the newly opened co