Webide instance management method, apparatus and system
Through the WebIDE instance management method, multi-window collaborative coding and debugging is supported, which solves the problem of only supporting single-window coding and debugging in the existing technology, and improves the work efficiency of programming developers.
Patent Information
- Application Number
- PCT/CN2024/078437
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-14
- Filing Date
- 2024-02-23
- Publication Date
- 2024-09-12
AI Technical Summary
Existing mainstream WebIDEs only support coding and debugging within a single browser window, limiting the work efficiency of programming developers.
Provides a WebIDE instance management method that supports coding and debugging in multiple windows through the collaborative work of the web client and WebIDE server, allowing users to collaboratively code, develop and debug the same WebIDE instance through multiple windows to achieve multi-window Split screen viewing, editing and debugging.
It greatly improves the work efficiency of programming developers, supports users to create multiple windows through multiple operation methods, meets users' usage habits, and provides convenience and flexibility for programming developers.
Smart Images

Figure CN2024078437_12092024_PF_FP_ABST
Abstract
Description
A WebIDE instance management method, device and system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 6, 2023, with application number 202310206532.X and application name “A Window Display Method and Device”, the entire contents of which are incorporated by reference into this application; this application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 14, 2023, with application number 202310868428.7 and application name “A WebIDE Instance Management Method, Device and System”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a WebIDE instance management method, device, and system. Background Art
[0004] Remote and cloud-based workspaces are becoming increasingly popular, allowing programmers to develop and debug code online from home using web integrity development environments (WebIDEs). WebIDE technology typically consists of a WebIDE service running on a server and a WebIDE instance used to access it. Programmers can use the WebIDE instance for code writing and development.
[0005] Currently, major domestic and international manufacturers have established their own presence in this technology, including Microsoft's Web version of VSCode, Eclipse's Theia, AWS's Cloud9, Tencent's Cloud Studio, and Alibaba's DevStudio. With WebIDE, users can achieve a coding experience nearly identical to a local IDE using only a browser, significantly conserving local resources. Furthermore, WebIDE's one-click generation capability eliminates the time spent configuring a compilation and debugging environment, allowing users to quickly engage in coding. Furthermore, WebIDE's ease of sharing, cross-platform functionality, and multi-instance capabilities have made it a popular choice among developers.
[0006] However, all major WebIDEs currently released only support coding debugging within a single browser window.
[0007] Summary of the Invention
[0008] The present application provides a WebIDE instance management method, device, and system that support multi-window coding debugging for WebIDE instances.
[0009] In the first aspect, the present application provides a WebIDE instance management system, which includes a web client and a WebIDE server. The web client usually runs on the user side, the WebIDE server can be used to provide services for the WebIDE instance, and the web client can display the front-end page corresponding to the WebIDE instance through a browser window, enabling users to perform online code development and debugging in the browser window.
[0010] In this system, a window of a WebIDE instance (referred to as a first window) may be displayed on a web client. The web client may be configured to receive a preset operation triggered by a user in the first window. In response to the preset operation, the web client may send a corresponding request (referred to as a first request) to the WebIDE server. The first request is used to request that a specified object of the WebIDE instance be displayed on the web client. Accordingly, after receiving the first request, the WebIDE server may be configured to send a response message to the web client for the first request. The response message is used to instruct the web client to display the specified object in a second window of the WebIDE instance. Thereafter, the web client may display a second window according to the response message and display the content of the specified object in the second window. The first window and the second window are configured to jointly display a front-end page corresponding to the WebIDE instance.
[0011] Through the above system, after the web client receives the preset operation triggered by the user on the specified object in the first window of the WebIDE instance, it sends a corresponding first request to the WebIDE server. The WebIDE server is used to provide services for the web client, such as sending a response message to the web client in response to the first request. The response message may be an instruction for the web client to open the second window of the WebIDE instance and display the content of the specified object in the second window, wherein the first window and the second window both belong to the WebIDE instance and are used to jointly display the front-end page corresponding to the WebIDE instance. That is, the WebIDE server in this application supports the establishment of multiple windows of a WebIDE instance on the web client. In this way, users can collaboratively develop and debug code for the project loaded by the same WebIDE instance through multiple windows, solving the pain point problem of the existing mainstream WebIDE technology that only supports single-window coding and debugging, and can greatly improve the work efficiency of programming developers.
[0012] In a possible design, the specified objects include but are not limited to one or more of the following:
[0013] (1) one or more functional modules included in the front-end page corresponding to the WebIDE instance, that is, the second window can be used to display the one or more functional modules;
[0014] (2) One or more files included in the project loaded in the WebIDE instance, wherein each file includes program code. In other words, the second window can be used to display the content of the one or more files.
[0015] Through the above system, the WebIDE server supports users to split some functional modules of the front-end page displayed in the first window of a WebIDE instance into a second window, and / or load some files in the project loaded by the WebIDE instance into the second window for display. In this way, users can realize split-screen viewing, editing, debugging and other tasks for multiple windows of a WebIDE instance, greatly improving the work efficiency of programming developers.
[0016] In one possible design, the preset operation received by the web client in the first window may include one or more of the following: a user's dragging operation on a specified object in the first window, a user's clicking operation on a specified object in the first window, a command input or selected by the user in the first window, and a shortcut key operation triggered by the user. Specifically, for example: dragging the specified object displayed in the first window to a blank area outside the first window or dragging it into the second window; or inputting or selecting a specified command in the first window, the specified command is used to indicate that the specified object is displayed in the second window; or a specified shortcut key operation is used to indicate that the specified object is displayed in the second window; wherein the second window can be an existing window or a new window of the WebIDE instance. Accordingly, the request is used to request to call the second window to display the specified object.
[0017] Through the above system, the window where the front-end page corresponding to the WebIDE instance is located supports various user operations, meets user usage habits, and provides convenience for programming developers.
[0018] In one possible design, a device running a web client includes a first display screen and a second display screen, with a first window displayed on the first display screen. In this scenario, a drag operation may be a user dragging a specified object from the first window to a blank area of the second display screen. Accordingly, the web client generates a first request for requesting the creation (or opening) of a new window (i.e., the second window) and displaying the specified object in the second window. Alternatively, in another possible design, a device running a web client includes a first display screen, with the first window displayed on the first display screen. In this scenario, a drag operation may be a user dragging a specified object from the first window to a blank area of the first display screen. Accordingly, the web client generates a first request for requesting the creation (or opening) of a new window (i.e., the second window) and displaying the specified object in the second window.
[0019] Through the above system, this application supports users to create multiple windows of WebIDE instances through various operation methods, meeting users' usage habits and providing flexibility for programming developers.
[0020] In one possible design, a device running a web client includes a first display screen, the first display screen displays a first window and a second window, or the device includes a first display screen and a second display screen, the first display screen displays the first window, and the second display screen displays the second window; in this scenario, a drag operation can be dragging a specified object from the first window to the second window; accordingly, the first request generated by the web client is used to request display of the specified object in the second window.
[0021] Through the above system, this application supports users to flexibly adjust the display content between two windows, providing convenience for programming developers.
[0022] In one possible design, the preset operation received by the web client in the first window may also be receiving a code jump instruction triggered by the user in the first window, wherein the code jump instruction indicates a jump from the current code location (recorded as the first code location of the first file) to the target code location (recorded as the second code location of the second file); wherein the first file and the second file may be the same file or different files; accordingly, the first request generated by the web client is used to request the display of the program code corresponding to the target code location of the second file. After receiving the first request, the WebIDE server determines that the second file is opened in the second window (for example, the WebIDE server determines this based on the status of each window of the WebIDE instance), and sends a response message to the web client regarding the first request.
[0023] Through the above system, the multi-window interaction of the WebIDE instance in this application allows window reuse. The same file does not need to be opened repeatedly in multiple windows. As long as there is one window to open the file, the file can be automatically jumped, which provides convenience for users and saves network resources for repeated loading of files.
[0024] In one possible design, code debugging instructions are generated during the code debugging process, and the WebIDE server is also used to: obtain the corresponding debugging results when running to the target code (the program code corresponding to the target code location) from the web client, and send an indication information to the web client, which is used to indicate that the debugging results are displayed in the second window.
[0025] Through the above system, when the code jumps to the second window, the debugging results can still be viewed in the second window in time, meeting the user's needs for program debugging through multiple screens, meeting the user's usage habits, and providing convenience for the user.
[0026] In one possible design, the WebIDE server includes the status of any window included in the WebIDE instance. The status of each window includes at least one of the following: the window identifier, the window level (e.g., whether the window is a main window or a subwindow), the functional modules included in the window, and the files opened in the window.
[0027] The web client may also send window status information to the WebIDE server after displaying the second window and displaying the specified object in the second window. The window status information includes changes in the content displayed in each changed window. Accordingly, the WebIDE server is further configured to update the status of each changed window according to the window status information.
[0028] Through the above system, the WebIDE server supports web browsers to open multiple windows of a WebIDE instance and records the status of each window. When the web client does not specify a display window, the WebIDE server can independently implement the aforementioned window interaction, window reuse and other technologies based on the status of each window, which helps save network resources and meets users' various usage habits of collaborative programming and debugging through multiple windows.
[0029] In one possible design, if the preset operation does not specify a window for displaying the specified object; before the WebIDE server sends a response message to the web client regarding the request, it is also used to: determine, based on the window status information of the WebIDE instance, that the specified object is opened in the second window; or, determine that the specified object is not opened in the first window.
[0030] In one possible design, before receiving the first request from the web client, the web client is also used to: send a second request to the WebIDE server, where the second request is used to request the creation of a WebIDE instance; and the WebIDE server is also used to: after receiving the second request, send resource information for displaying the front-end page corresponding to the WebIDE instance to the web client.
[0031] In a second aspect, the present application provides a WebIDE instance management method, which can be applied to a system including a web client and an online integrated development environment WebIDE server. The web client is used to run the WebIDE instance through one or more windows. The method includes: the web client receives a preset operation triggered by a user in a first window of the WebIDE instance, and the preset operation is used to call a second window of the WebIDE instance to display a specified object of the WebIDE instance; the first window and the second window are used to jointly display a front-end page corresponding to the WebIDE instance; the web client sends a request to the WebIDE server, and the request is used to request that a specified object be displayed in the second window of the WebIDE instance; the WebIDE server sends a response message to the client for the request; and the client displays the second window and displays the specified object in the second window based on the response message.
[0032] The second aspect includes any possible design method described in the first aspect. The beneficial effects of the second aspect and the methods in each possible design of the second aspect can be found in the description of the first aspect and will not be repeated here.
[0033] In a third aspect, the present application provides another WebIDE instance management method, which is applied to a WebIDE server, where the WebIDE server is communicated with a web client, and the web client is used to display a window corresponding to the WebIDE instance. The method includes: the WebIDE server receives a first request from the web client, where the first request is triggered by a user in a first window of the WebIDE instance displayed by the web client, and is used to request the display of specified content of the WebIDE instance; and sends a response message to the web client for the first request, where the response message instructs the web client to display the specified content in a second window of the WebIDE instance, where the first window and the second window are used to display the front-end page corresponding to the WebIDE instance.
[0034] In one possible design, before receiving the first request from the web client, it also includes: receiving a second request from the web client, the second request being used to request creation of the WebIDE instance; and sending a front-end page corresponding to the WebIDE instance to the web client.
[0035] In one possible design, the object to which the specified content belongs includes: at least one functional module included in the front-end page corresponding to the WebIDE instance, and / or at least one file loaded in the WebIDE instance, wherein each file includes program code.
[0036] In one possible design, the WebIDE server includes the status of any window included in the WebIDE instance, where the status of each window includes at least one of: an identifier of the window, a level of the window, functional modules included in the window, and information about files opened in the window;
[0037] The method further includes: receiving window status information from the web client, the window status information being used to indicate a change in content displayed in each of the one or more windows; and updating a status of each of the one or more windows according to the window status information.
[0038] The beneficial effects of the methods in the third aspect and various possible designs of the second aspect can be found in the description of the first aspect and will not be repeated here.
[0039] In the fourth aspect, the present application also provides a WebIDE server, which has the function of implementing the WebIDE server behavior in the system instance of the first aspect or the method instance of the second or third aspect. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The functions can be implemented by hardware, or by hardware executing the corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In one possible design, the structure of the device includes a receiving module, a sending module, and optionally a processing module. These modules can execute the corresponding functions in the system instance of the first aspect or the method example of the second or third aspect. Please refer to the detailed description in the method example for details, which will not be repeated here.
[0040] In a fifth aspect, the present application also provides a computing device having the function of implementing the WebIDE server-side behavior in the system instance of the first aspect or the method instance of the second aspect or the third aspect. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The structure of the computing device includes a processor and a memory, and the processor is configured to support the device to perform the corresponding functions in the system instance of the first aspect or the method example of the second aspect or the third aspect. The memory is coupled to the processor, which stores the necessary program instructions and data for the communication device. The structure of the communication device also includes a communication interface for communicating with other devices.
[0041] In a sixth aspect, the present application also provides a computing device cluster, which has the function of implementing the behavior of the device in the method example of the first aspect above. The beneficial effects can be found in the description of the first aspect and will not be repeated here. The computing device cluster includes at least one computing device, and the structure of any computing device includes a processor and a memory. The processor in any computing device is configured to support the device to perform part or all of the functions of the first aspect and each possible implementation method of the first aspect above. The memory is coupled to the processor, which stores the necessary program instructions and data for the communication device. The structure of the communication device also includes a communication interface for communicating with other devices.
[0042] In the seventh aspect, the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the method in the above-mentioned second aspect and each possible implementation of the second aspect, or enables the computer to execute the method in the above-mentioned third aspect and each possible implementation of the third aspect.
[0043] In an eighth aspect, the present application also provides a computer program product comprising instructions, which, when run on a computer, enables the computer to execute the method in the above-mentioned second aspect and each possible implementation of the second aspect, or enables the computer to execute the above-mentioned third aspect and each possible implementation of the third aspect.
[0044] In the ninth aspect, the present application also provides a computer chip, which is connected to a memory, and the chip is used to read and execute the software program stored in the memory, execute the method of the above-mentioned second aspect and each possible design of the second aspect, or enable the computer to execute the method of the above-mentioned third aspect and each possible implementation method of the third aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] FIG1A is a schematic diagram of a system architecture;
[0046] FIG1B is a schematic diagram of a system architecture provided in an embodiment of the present application;
[0047] FIG2 is a flow chart of a WebIDE instance management method according to an embodiment of the present application;
[0048] FIG3 is a schematic diagram of a front-end page corresponding to a WebIDE instance provided in an embodiment of the present application;
[0049] FIG4 is a schematic diagram of a command window provided in an embodiment of the present application;
[0050] FIG5 is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0051] FIG6 is a schematic diagram of another application scenario provided by an embodiment of the present application;
[0052] FIG7 is a schematic diagram of a flow chart corresponding to Example 1 provided in an embodiment of the present application;
[0053] FIG8 is a schematic diagram of a flow chart corresponding to Example 2 provided in an embodiment of the present application;
[0054] FIG9 is a schematic diagram of a flow chart corresponding to Example 3 provided in an embodiment of the present application;
[0055] FIG10 is a schematic diagram of a flow chart corresponding to Example 4 provided in an embodiment of the present application;
[0056] FIG11 is a schematic diagram of a debugging window provided in an embodiment of the present application;
[0057] FIG12 is a comparative schematic diagram of a code debugging process provided in an embodiment of the present application;
[0058] FIG13 is a schematic diagram of the structure of a WebIDE server provided in an embodiment of the present application;
[0059] FIG14 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;
[0060] FIG15 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0061] FIG16 is a schematic diagram of the structure of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to better understand the solutions of the embodiments of the present application, some relevant terms and concepts that may be involved in the embodiments of the present application are first introduced below.
[0063] 1. Web integrity development environment (WebIDE) is an online integrated development environment designed for programming developers. The program codes written by programming developers are stored in the cloud, supporting breakpoint debugging, version management, team development, etc. Compared with traditional local IDEs, WebIDE is faster, more efficient and more secure. For example, in the past, the development environment (such as local IDE) had to be reinstalled every time the computer was changed, but WebIDE does not need to be reinstalled, or in other words, there is no need to build a development environment locally. You can open a browser on any user device (such as a computer) to start coding and development immediately, which supports real-time online coding and development for users, which is faster and more efficient. In addition, the code is saved in the cloud in real time. Even if the local computer hard drive is damaged, the code will not be lost, which is more secure.
[0064] 2. Local IDE, also known as IDE client. The difference between local IDE and WebIDE is that before using local IDE, users need to install the local IDE software locally on their device. All project files required by users are stored locally on the user's device. The main functions of the local IDE are provided by the IDE software installed locally on the user.
[0065] Figure 1A is a schematic diagram of a possible network architecture provided in an embodiment of the present application. The network architecture includes a service server 100 and a user device 200. The service server 100 and the user device 200 can establish a communication connection. For example, the connection can be made directly or indirectly via wired communication or wireless communication. The specific connection can be determined based on the actual application scenario and is not limited in this application.
[0066] The business server 100 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud databases, cloud services, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, as well as big data and artificial intelligence platforms.
[0067] The user device 200 can be a laptop, tablet computer, desktop computer, smart phone, PDA, mobile internet device (MID), wearable device (such as smart watch, smart bracelet, etc.), smart car terminal or other smart terminal.
[0068] At the hardware level, the user device 200 in the present application may include one or more display devices (such as display screens, monitors, etc.). For example, the user device 200 includes a laptop computer (the laptop computer itself has a display screen) and one or more display screens external to the laptop computer. For another example, the user device 200 includes a desktop computer and one or more display screens external to the desktop computer. Alternatively, the user device 200 in the present application may be a workstation composed of multiple (two or more) user terminals with independent display devices. For example, the user device 200 includes a laptop computer, a desktop computer, an iPad, or the user device 200 includes a laptop computer, a mobile phone, etc., without specific limitation. The multiple user terminals can be connected to each other by wired or wireless means, and the multiple user terminals can realize information sharing through the connection, for example, the content displayed on the display screen of user terminal 1 is moved to the display screen of user terminal 2 for display, or the content displayed on the display screen of user terminal 2 is moved to the display screen of user terminal 1 for display.
[0069] At the software level, various application clients can be installed in the user device 200, for example, a client with the function of displaying data information such as text, images, audio and video, such as a web browser, an email client, an instant messaging client software, etc., which can be determined according to the actual application scenario requirements and is not limited here. In the embodiment of the present application, the application client includes an application program that can load a web page, such as a browser, a browser plug-in, or a lightweight client (or a small client) with a web page function. Taking a browser as an example, the user device 200 can exchange data with the business server 100 through the web client, so that the business server 100 can receive business data from the user device 200 and display the business data through the web window (or browser window, hereinafter referred to as the window) provided by the web client.
[0070] The business server 100 can act as a server to provide one or more business function services to the client of the user device 200. When providing business function services to the application client, the server will provide an interface so that the client can call this interface and use the business function service corresponding to this interface. There are many types of interfaces, such as account login interface, permission authentication interface, information storage interface, etc. The application client can initiate an interface request to request to call the interface provided by the server. For example, the interface request includes account login information such as username and password. After receiving this interface request, the server allows the application client user to log in to the account based on the account login information to access the server.
[0071] For example, in a scenario where the application client is a browser and a WebIDE server is deployed in the business server 100, the WebIDE server is used to provide WebIDE services, such as providing various WebIDE server interfaces and managing WebIDE instances. A user can use the browser on the user device 200 to call the WebIDE server interface and send a WebIDE instance creation request to the WebIDE server. The WebIDE server responds to the creation request, creates a WebIDE instance, and then instructs the browser to display the front-end page corresponding to the WebIDE instance in a window. The user can then write and debug program code in this window. It should be noted that the WebIDE instance here refers to a WebIDE access instance, which is used to provide users with an online programming environment.
[0072] The existing major WebIDEs all have a problem, that is, they only support users to debug code in a single browser window. Different windows load the front-end pages of independent WebIDE instances. Every time a user opens a window, a new WebIDE instance is created. The windows (or WebIDE instances) cannot interact effectively with each other, making it impossible for code developers to use multiple display screens of the user device 200 for coordinated debugging. This is very inconvenient for programming developers and will reduce programming development efficiency.
[0073] In view of this, an embodiment of the present application provides a method for managing a WebIDE instance and a system architecture to which the method may be applicable. In conjunction with the system architecture shown in FIG1B , in this method, a WebIDE server supports a web client running on a user device 200 to create multiple windows of a WebIDE instance (such as the main WebIDE window and at least one sub-WebIDE window in FIG1B , where a WebIDE window refers to a window used to display the front-end page corresponding to the WebIDE instance, and may be referred to as a WebIDE instance window). These multiple windows jointly display the front-end page corresponding to the WebIDE instance. In this way, users (such as programming developers) can view, write, and debug program code through multiple windows, achieving linkage and coordination among multiple windows and improving user work efficiency.
[0074] Continuing with FIG1B , in one embodiment, the WebIDE server may include a window scheduling module, which may be a hardware module, a software module, or a combination of a software module and a hardware module. Specifically, the window scheduling module is used to record the status of each window of a WebIDE instance and manage interactions between windows within the WebIDE instance.
[0075] Please note that, different from the common application scenarios of existing web browsers, such as when a user uses the search engine of a web browser to perform a query, the application scenario in which the query results (web pages) can be viewed in split-screen through multiple browser windows, and the application scenario of this application using multiple browser windows of a web browser to run a WebIDE instance, although the two application scenarios achieve similar effects, the difference is that in the former application scenario, since there is information correlation between the query results displayed by the two web pages, the user can artificially assign an association between the two browser windows, such as split-screen viewing of the web pages loaded in the two browser windows, but in fact, the two browser windows are still independent of each other. Although split-screen viewing is a common application scenario of existing web browsers, the problem raised in the embodiment of the present application cannot be solved by referring to the technology adopted in the former application scenario. Using multiple display screens to split-screen view the contents of a WebIDE instance is a technical effect that can be achieved based on the technology provided by this application.
[0076] The following describes the WebIDE instance management method in the embodiment of the present application by taking the method applied to the system architecture shown in Figure 1B as an example.
[0077] FIG2 is a flow chart illustrating a WebIDE instance management method according to an embodiment of the present application. The method may be executed by the user device 200 and the service server 100 in FIG1B , or by the web client and the WebIDE server in FIG1B , or by a window scheduling module deployed in the web client (or window) and the WebIDE server. For ease of explanation, the following description assumes that the web client is a browser and that the browser and the WebIDE server are executed as an example. As shown in FIG2 , the method may include the following steps:
[0078] Step 201: The browser sends a WebIDE instance creation request to the WebIDE server.
[0079] The browser and the WebIDE server can communicate directly or indirectly through various methods, such as http, https, and WebSocket, without limitation.
[0080] In step 202 , the WebIDE server creates a WebIDE instance in response to the creation request, and sends resource information for displaying a front-end page corresponding to the WebIDE instance to the browser.
[0081] The user can control the browser to send a WebIDE instance creation request to the WebIDE server. For example, the creation request can be triggered when the user accesses the WebIDE server for the first time through the browser. The WebIDE server responds to the creation request, creates the WebIDE instance, and sends the resource information for displaying the front-end page corresponding to the WebIDE instance to the browser. The browser loads the front-end page corresponding to the WebIDE instance in the window based on the resource information, and loads the files of one or more engineering projects belonging to the user in the front-end page. These files can be stored in the WebIDE server or cloud devices, and are obtained by the WebIDE server and sent to the browser for display. The content of these files is usually the program code written by the user for the project. Afterwards, the user can view, write, modify, and perform other operations on the program code displayed on the front-end page. In an embodiment of the present application, multiple windows can be opened in a WebIDE access instance to display the front-end page corresponding to the WebIDE access instance.
[0082] Figure 3 is a schematic diagram of the front-end page corresponding to a WebIDE instance. The front-end page corresponding to the WebIDE instance is primarily used to provide a window for programming code. As shown in Figure 3, the front-end page is used to provide various functional modules related to programming code, such as, but not limited to, a menu bar, a file bar, a coding area, a debugging area, and a combination of one or more of the following. Each functional module is introduced below:
[0083] The menu bar, typically a tree-like structure, provides access to most software functions. The menu bar can include multiple menu items, as shown in FIG4 . In this embodiment, the menu items primarily include command entries. When a user selects a command entry option in the menu bar, a command window pops up. In the command window, the user can enter a command or select a historical command, such as opening a file or triggering a function (e.g., starting debugging). The specifics are not limited thereto.
[0084] The file bar is used to display the file directory (or file tree) of the project loaded by the WebIDE instance. Users can select a file in the file directory and choose to open the file. It can be understood that these files can be created by users (such as programming developers). These project files usually contain program codes written by users for the project, or they can also include open source files downloaded or imported by users from other devices (such as the cloud), without specific restrictions. Of course, in addition to opening files, users can also perform other operations in the file bar, such as creating files, deleting files, dragging files, moving files, etc., without specific restrictions.
[0085] The coding area is a readable and writable area that can be used to display the opened file, the content of the opened file (such as program code), and the program code that the user can input and edit in the opened file, etc.
[0086] The debug area includes a debug module and a debug results display area. The debug module is used to start the code debugging process, and the debug results display area is used to display debug results such as the debug status and variable values determined during the debugging process. The debug module supports various debugging methods, such as single-step debugging and breakpoint debugging. Please refer to the introduction of existing debugging methods for details, and will not be explained here.
[0087] It should be noted that the front-end page shown in FIG3 is only an example. The front-end page corresponding to the WebIDE instance in actual application may have more or fewer functional modules relative to FIG3, or each functional module may have a different display method. The embodiment of the present application does not limit the functional modules included in the front-end page corresponding to the WebIDE instance and the layout position of each functional module. In addition, it should be noted that the functional modules in this embodiment may also include the controls in the various areas introduced above (such as the debugging module), etc., and any object that can be moved in the front-end page can be used as a functional module.
[0088] In step 203 , the browser opens (or creates) a window (referred to as a first window), and loads a front-end page corresponding to the WebIDE instance in the first window according to the resource information.
[0089] In one embodiment, the WebIDE server sends the front-end page corresponding to the WebIDE instance to the browser, which then opens a first window and uses the first window to load the front-end page. A window that loads the front-end page corresponding to the WebIDE instance may also be referred to as a WebIDE window or a window of the WebIDE instance. Hereinafter, adverbials such as first, second, and third may be used to distinguish multiple windows of a WebIDE instance.
[0090] The embodiment of the present application supports creating multiple windows of a WebIDE instance, and the multiple windows can be divided into a main WebIDE window (hereinafter referred to as the main window) and a sub-WebIDE window (hereinafter referred to as the sub-window). Among them, the main window is responsible for the main business of the WebIDE, and the sub-window is responsible for part of the business related to the display content. In one embodiment, the main window can be the window of the front-end page corresponding to the WEBIDE instance that the browser first loads after requesting the WebIDE server to create a WEBIDE instance. For example, the first window in step 203 is the main window, and one or more windows belonging to the WebIDE instance created after the first window are all sub-windows. It can be understood that the sub-window can be used to share part of the display content of the main window.
[0091] It should be understood that the content displayed in the main window and sub-windows is not fixed. For example, after the main window loads the front-end page shown in Figure 3, the user can perform operations such as opening files and editing program code in the main window. At this time, the content displayed in the main window may change with the user's operations. For another example, if part of the functional module of the main window is moved out of the main window and displayed in the sub-window, the content displayed in the main window and sub-window will also change.
[0092] Step 204: The WebIDE server records the state of the first window of the WebIDE instance.
[0093] This step may include: the browser sending an indication message to the WebIDE server indicating that the first window was successfully created, and the WebIDE server recording the status of the first window based on the indication message. In one example, the indication message includes an identifier of the first window and information indicating the content opened in the first window. The status of the first window may include, but is not limited to, at least one of the following: an identifier of the first window, a level of the first window (the level indicating whether the window is a main window or a subwindow), and content opened in the first window, such as function modules loaded in the first window and open files.
[0094] Among them, the identifier of the first window can be generated by the WebIDE server and generated and sent to the browser by the WebIDE server in step 202, or the identifier of the first window is generated by the browser and carried in the indication message and sent to the WebIDE server, without specific limitation.
[0095] Step 205: The browser receives a preset operation triggered by the user on a designated object in the first window.
[0096] In step 206 , the browser sends a request to the WebIDE server in response to the preset operation, where the request is used to request that the specified object be displayed in the manner indicated by the preset operation.
[0097] The designated object in this embodiment includes, but is not limited to, one or more of the following: at least one functional module included in the front-end page corresponding to the WebIDE instance, and at least one file loaded in the WebIDE instance.
[0098] In this embodiment, the preset operation can be a combination of one or more operations such as dragging, clicking, commanding, shortcut keys, etc. The following are introduced respectively:
[0099] (1) The preset operation includes the drag operation.
[0100] In an example, the preset operation may be dragging a designated object in the first window to an area outside the first window (recorded as a blank area).
[0101] As shown in Figure 5, in one scenario, the user device 200 includes only one display screen (referred to as display screen 1), and the first window can be displayed in a partial area of the display screen 1, and the remaining area is a blank area (regardless of whether there is content displayed, it is referred to as a blank area). The preset operation can be that the user drags a functional module (such as a debugging area) or a specified file (which can be a file in the file bar or an opened file in the coding area of the first window) in the first window to a blank area outside the first window in the display screen 1. At this time, the preset operation is used to call a new window (referred to as the second window) to display the content of the functional module or the file. For example, taking file A as an example, the drag operation can be that the user selects file A in the file bar of the first window with the mouse, presses and holds the mouse button, moves the mouse to drag the selected file A to the blank area of the display screen 1, and releases the mouse button to release the file A in the blank area. At this time, the user's intention of the preset operation is to create a subwindow of the WebIDE instance, open file A in the new subwindow, and display the content of file A. Correspondingly, the request generated based on the preset operation is used to request the creation of a new sub-window of the WebIDE instance, and to open file A in the new sub-window and display the content of file A.
[0102] As shown in Figure 6, in another scenario, the user device 200 includes multiple display screens, such as display screen 1 and display screen 2, and the first window can be displayed on any one of the display screens, such as display screen 1. At this time, display screen 2 does not display any window of the WebIDE instance. The preset operation can be that the user drags a functional module or a file in the first window to display screen 2. At this time, the preset operation is used to call a new window (recorded as the second window) to display the content of the functional module or the file. Please refer to the above introduction to the example of Figure 5, which will not be repeated here. The difference between the two scenarios shown in Figures 5 and 6 is that in Figure 5, the second window will be displayed in display screen 1, specifically the blank area of display screen 1, and in Figure 6, the second window will be displayed in display screen 2, which is more in line with the user's intention.
[0103] In the above scenario, if the WebIDE instance includes other windows in addition to the first window, such as after creating a new second window, the preset operation may also include dragging the specified object from one window of the WebIDE instance to another window of the WebIDE instance. If the preset operation is to drag the specified object from the first window to the second window, accordingly, the request generated based on the preset operation is used to request to display the content of the specified object in the second window, or, if the specified object is already displayed as open in the first window, the request may also be used to request to close the specified object displayed in the first window and display the content of the specified object in the second window.
[0104] Alternatively, the preset operation is to drag the specified object from the second window to the first window. Accordingly, the request generated based on the preset operation is used to request that the content of the specified object be displayed in the first window, or, if the specified object is already displayed as open in the second window, the request can also be used to request to close the specified object displayed in the second window and display the content of the specified object in the first window.
[0105] (2) Preset operations include user input or selection of specified commands.
[0106] Please understand in conjunction with Figure 4 that the preset operation can be that the user enters or selects a specified command in a command window called from the first window, and the specified command is used to instruct to move a functional module in the first window to the second window (the first window no longer displays the functional module), or, the specified command is used to instruct to display a functional module in the second window (the functional module remains in the first window), or, the specified command is used to instruct to move an open file in the first window to the second window (the first window no longer opens the file), or, the specified command is used to instruct to open a file in the second window, etc. The second window indicated in the command can be a new window or an existing window, without specific limitation.
[0107] If the second window is a new window, the request generated based on the preset operation is used to request the creation of a new sub-window of the WebIDE instance, and to display the content of the specified object in the new sub-window.
[0108] If the second window is an existing window of the WebIDE instance, the request generated based on the preset operation is used to request displaying the content of the specified object in the second window.
[0109] (3) Preset operations include specified shortcut key operations.
[0110] The preset operation may also be a designated shortcut key operation triggered by the user through an input device such as a keyboard.
[0111] In one example, the designated shortcut key operation can be implemented based on the first window. For example, a shortcut key operation (denoted as shortcut key 1) is used to call the command window of the first window. Subsequently, a shortcut key operation (denoted as shortcut key 2) is used to select or type the designated command described above in the command window, etc. Correspondingly, the generated request can be found in the above description and will not be repeated here.
[0112] In another example, the shortcut key operation does not need to be implemented in the first window. For example, a shortcut key operation (recorded as shortcut key 3) is used to move a specified object in the main window to the second window. For another example, a shortcut key operation (recorded as shortcut key 4) is used to display a specified object in the second window (such as opening a file), etc. Correspondingly, the generated request can be found in the above description and will not be repeated here.
[0113] It should be understood that different user intentions should be distinguished by different shortcut key operations. For example, shortcut key 1 is ctrl+F1, shortcut key 2 is ctrl+F2, shortcut key 3 is ctrl+F3, shortcut key 4 is ctrl+F4, etc. This is only an example and is not limited to this.
[0114] Furthermore, the preset operation may also include a combination of the above-mentioned multiple operations. For example, the preset operation includes the aforementioned shortcut key 1 and the user inputting or selecting a specified command in the command window, etc., which is not specifically limited.
[0115] It should be noted that the preset operations listed above are only examples. The preset operations applicable to the embodiments of the present application can also be performed through other user operations, such as triggering code jump instructions. The embodiments of the present application do not limit this. Any operation that indicates calling a new window to display a specified object, or indicates displaying a specified object in an existing window, or indicates moving a specified object between two windows is applicable to the embodiments of the present application.
[0116] Step 207: After receiving the request, the WebIDE server sends a response message to the browser.
[0117] After receiving the request, the WebIDE server generates a response message. The following describes the content of the corresponding response message based on the request type.
[0118] In summary, the requests generated based on the preset operations in this embodiment include the following categories:
[0119] 1) This request is used to request to open a new window of the WebIDE instance and display the specified object in the new window.
[0120] For example, the request may include, but is not limited to, one or more of the following information: a new creation instruction, information indicating a WebIDE instance, information indicating a specified object (e.g., if the specified object is a file, this information may be a file identifier such as the file name, file path, or file handle; if the specified object is a function module, this information may be a function module identifier), and a new sub-window identifier. The new creation instruction indicates the creation of a new sub-window.
[0121] Accordingly, the response message is used to instruct the browser to create a new window of the WebIDE instance and display the specified object in the new window.
[0122] Optionally, before generating a response message, the WebIDE server may also determine whether the specified object is already opened in an existing window (such as the first window) of the WebIDE instance. If it is already opened, the response message may also be used to instruct closing the specified object opened in the existing window of the WebIDE instance, creating a new window of the WebIDE instance, and displaying the specified object in the new window.
[0123] 2) This request is used to request that an existing window of the WebIDE instance be called to display the content of a specified object.
[0124] Exemplarily, the request may include, but is not limited to, one or more of the following information: information indicating a WebIDE instance, information indicating a specified object, and an identifier of an existing window.
[0125] Accordingly, the response message is used to instruct the browser to display the content of the specified object in an existing window (such as the second window) of the WebIDE instance.
[0126] Optionally, before generating a response message, the WebIDE server may also determine whether the specified object is already opened in other existing windows of the WebIDE instance (such as the first window). If it is already opened, the response message may also be used to instruct closing the specified object opened in the first window of the WebIDE instance and displaying the content of the specified object in the second window of the WebIDE instance.
[0127] 3) The request is used to request to move a specified object from the first window to the second window of the WebIDE instance.
[0128] When the second window is a new child window, the request may include, in addition to the aforementioned information of type (1), a close instruction for instructing the browser to close the specified object in the first window. Accordingly, the response message instructs the browser to close the specified object in the first window of the WebIDE instance, create a new window of the WebIDE instance, and display the content of the specified object in the new window.
[0129] Alternatively, when the second window is an existing window, the request may include, in addition to the aforementioned information of type (2), a close instruction, which is used to instruct the browser to close the specified object in the first window. Accordingly, the response message is used to instruct the browser to close the specified object in the first window of the WebIDE instance and display the content of the specified object in the second window.
[0130] 4) The request is for displaying a specified object, but a window for displaying the specified object is not specified.
[0131] The WebIDE server can randomly select a window from the existing sub-windows of the WebIDE instance and display the content of the specified object in the selected window through a response message. Or,
[0132] The WebIDE server can select the user's default window (such as the main window) according to the settings, and display the content of the specified object in the default window through the response message. Or,
[0133] The WebIDE server can select the window where the user last operated or the window that triggered the preset operation this time based on the user's operation record, and display the content of the specified object in the window through a response message.
[0134] Optionally, if the WebIDE server determines that the specified object is already opened in another existing window of the WebIDE instance, and the existing window is different from the window selected by the WebIDE server to display the specified object, the response message, in addition to indicating the above content, can also be used to instruct closing the specified object opened in the other window.
[0135] In the above, the WebIDE server can determine whether the specified object is opened in an existing window based on the status information of the WebIDE instance. The status information of the WebIDE instance will be introduced in detail below and will not be repeated here.
[0136] In step 208 , the browser displays a second window of the WebIDE instance based on the response message and displays the specified object in the second window.
[0137] In step 209 , the browser sends window status information to the WebIDE server. The window status information includes information about the window of the WebIDE instance that has changed. The information is used to indicate changes in the content displayed in the window.
[0138] It should be noted that step 209 is an optional step and is not a must-do step. For example, the WebIDE server may also update the status of each window of the WebIDE instance that has changed according to the response message.
[0139] In step 210 , the WebIDE server updates the status of each window of the WebIDE instance that has changed.
[0140] The WebIDE server stores the status information of the WebIDE instance. This status information is used to indicate the mapping relationship between the main window and sub-windows of the WebIDE instance, and the status of each window of the WebIDE instance. The status of each window includes the content displayed by the window. For example, see Table 1 for an example of status information provided in an embodiment of the present application.
[0141] Table 1
[0142] The steps 208 to 210 are described in detail below using a specific example:
[0143] In one embodiment, the preset operation is used to indicate the creation of a new sub-window. Accordingly, the response message can be used to indicate permission to open a new window of the WebIDE instance, such as a second window. In step 208, the browser opens a new window, i.e., the second window, based on the response message. After the second window is successfully created, the browser sends an indication message to the WebIDE server indicating the successful creation of the second window. In one example, the indication message includes one or more of the following: information indicating the WebIDE instance, the identifier of the first window, the identifier of the second window, and the content opened in the second window (which is blank at this time, i.e., no content of the WebIDE instance is displayed). In step 210, the WebIDE server records the status of the second window based on the indication information (see the introduction to recording the status of the first window above, which will not be repeated here), and updates the mapping relationship between the main and sub-windows of the WebIDE instance. The mapping relationship is used to indicate the main and sub-windows included in a WebIDE instance. For example, the mapping relationship includes the identifier of the first window and the identifier of the second window, and indicates that the first window is the main window and the second window is the sub-window.
[0144] In another embodiment, the preset operation is used to instruct the display of the specified object in the new window. Accordingly, the response message can be used to instruct the opening of a new window of the WebIDE instance. In step 208, the browser opens a new sub-window of the WebIDE instance (referred to as the second window) based on the response message. After the second window is successfully created, the browser sends an indication message to the WebIDE server indicating the successful creation of the second window (the content of the indication message is not limited). Thereafter, the WebIDE server sends the content of the specified object to the browser, and the browser receives the content of the specified object and displays the content of the specified object in the second window. The specified object can be moved from the first window or newly opened. Optionally, the WebIDE server can also record the status of the second window and update the mapping relationship between the main and sub-windows of the WebIDE instance. In step 209, the browser sends window status information to the WebIDE server. The window status information includes one or more of the following: information indicating the WebIDE instance, the identifier of the first window, the identifier of the second window, the content opened in the first window (or information indicating changes in the first window), and the content opened in the second window (the specified object has been loaded at this time). In step 210, the WebIDE server updates the state of the window (e.g., the second window, and optionally, the first window) that has changed, as well as the mapping between the main and subwindows of the WebIDE instance, based on the window state information. Note that if the specified object is moved from the first window to the second window, the second indication message may also include the changes to the first window, and the WebIDE server will need to update the state of the first window accordingly.
[0145] In another embodiment, the preset operation is used to indicate that a specified object is displayed in a new sub-window. Accordingly, the response message indicates that a new sub-window of the WebIDE instance is opened (recorded as the second window) and the specified object is loaded in the second window. In step 208, the browser creates a new second window and receives the content of the specified object from the WebIDE server. After the second window is successfully created, the content of the specified object is displayed in the second window. The specified object may be moved from the first window or obtained from the WebIDE server. In step 209, the browser sends window status information to the WebIDE server. The window status information may include one or more of the following: information indicating the WebIDE instance, the identifier of the first window, the identifier of the second window, the content loaded in the first window (or information indicating changes in the first window), and the content loaded in the second window (the specified object has been loaded at this time). In step 210, the WebIDE server updates the status of the changed window and the mapping relationship between the main and sub-windows of the WebIDE instance according to the second indication message.
[0146] The above describes the process of creating two windows of a WebIDE instance. Optionally, more sub-windows of the WebIDE instance can be created in the browser afterwards. This application does not limit this, and the subsequent process will not be described in detail. It should also be noted that the sub-windows introduced above are illustrated by showing part of the content of the main window. The purpose of this practice is to save resources and simplify the complexity of programming and debugging. The sub-windows usually load lightweight front-end pages. Of course, the embodiment of the present application also supports the front-end page loaded by the sub-window being the same as the front-end page loaded by the main window. Please understand that the same here means that the functional modules included in the front-end page are the same, but the content displayed by the main and sub-windows may be different.
[0147] Through the above design, the embodiment of the present application can realize the creation of multiple windows by one WebIDE instance, and each of the multiple windows can display the front-end page corresponding to the WebIDE instance. In this way, users can drag different windows to different display screens for split-screen reading, coding, and debugging of program code for the same project, or display multiple windows side by side on one display screen to perform these operations. By coordinating and linking coding and debugging with multiple windows, rather than only supporting users to code and debug in a single window, the work efficiency of programming developers can be greatly improved.
[0148] In conjunction with the solution shown in FIG2 , several embodiments corresponding to the WebIDE instance management method provided in the embodiment of the present application are listed below.
[0149] Example 1:
[0150] FIG7 is a schematic diagram of a process corresponding to the first embodiment. As shown in FIG7 , the process may include the following steps:
[0151] In step 701 , the browser receives an operation of opening a specified file in a specified window (such as a second window) triggered by a user in a main window or an existing sub-window (such as a first window) of a WebIDE instance.
[0152] The second window can be a main window, an existing sub-window or a new sub-window. That is, the first window and the second window can be the same window or different windows.
[0153] For example, display screen 1 displays a main window and sub-window 1, or display screen 1 displays a main window and display screen 2 displays sub-window 1. The operation may include: dragging a file opened in the main window to sub-window 1, or dragging a file opened in sub-window 1 to the main window, or dragging a file selected in a file bar of the main window to sub-window 1, or dragging a file selected in a file bar of sub-window 1 to the main window.
[0154] For another example, display screen 1 displays sub-window 1 and sub-window 2, or display screen 1 displays sub-window 1 and display screen 2 displays sub-window 2. The operation may also include: dragging an open file in sub-window 1 to sub-window 2, or dragging an open file in sub-window 2 to sub-window 1, or dragging a file selected in the file column of sub-window 1 to sub-window 2, or dragging a file selected in the file column of sub-window 2 to sub-window 1. The main window may be stacked under a sub-window or located in a partial area of a display screen.
[0155] It should be noted that the operation in step 701 may also be a preset operation triggered by a shortcut key, command or other means. Please refer to the above introduction to the preset operation, which will not be repeated here.
[0156] Step 702: The browser sends a request to the WebIDE server in response to the operation.
[0157] In step 703 , after receiving the request, the WebIDE server determines whether the second window is a new child window. If so, step 704 is executed; otherwise, step 707 is executed.
[0158] In one example, when the request includes a create instruction, the WebIDE determines to open the specified file in a new sub-window.
[0159] In another example, when the request includes an identifier of a specified window, the WebIDE server may determine whether the specified window is an existing window of the WebIDE instance based on the state information of the WebIDE instance, thereby determining whether to open the specified file in a new sub-window.
[0160] In step 704 , the WebIDE server sends a first response message to the browser for the request. The first response message is used to notify the browser to open a second window and load the specified file in the second window.
[0161] In step 705 , the browser opens a new sub-window (ie, a second window), opens the designated file in the second window, and displays the content of the designated file.
[0162] Step 706: The WebIDE server updates the status information of the WebIDE instance.
[0163] Specifically, the WebIDE server updates the status information of the WebIDE instance by setting the second window as a child window and recording the status of the second window. Optionally, when the specified file is moved out of the first window, the specified file in the first window needs to be closed. In this case, the content displayed in the first window will also change. Therefore, the WebIDE server updates the status information of the WebIDE instance by also updating the status of the first window.
[0164] In step 707 , the WebIDE server sends a second response message to the browser in response to the request. The second response message is used to notify the browser to put the second window on top and load the specified file in the second window.
[0165] Step 708: The browser places the second window on top, opens the specified file in the second window, and displays the content of the specified file.
[0166] It should be noted that the browser pinning the designated window is an optional step and is not required. For example, when the designated window is already pinned to the top, the browser does not need to perform this operation. It should also be noted that in step 705 or step 708, if the designated file is moved out of an existing window, that is, the designated file is already opened in the existing window (such as the main window), the designated file opened in the main window also needs to be closed.
[0167] In step 709 , the WebIDE server updates the status of each window that has changed.
[0168] Among them, step 702 can refer to the relevant description of step 206 above, steps 704 to 706 can refer to the relevant description of steps 207 to 210 above, and step 709 can refer to the relevant description of step 210 above, which will not be repeated here.
[0169] Through the above design, the embodiment of the present application supports users to display multiple files of a project in different windows. The multiple windows can be viewed side by side on one display screen, or the multiple windows can be viewed in split screen on multiple display screens. In this way, users can read, modify, and write program code in conjunction with the files displayed in the multiple windows. For example, users can see the program code loaded in multiple windows at the same time, greatly improving the work efficiency of program developers.
[0170] Example 2:
[0171] FIG8 is a schematic diagram of a process corresponding to the second embodiment. As shown in FIG8 , the process may include the following steps:
[0172] In step 801 , the browser receives an operation (unspecified window) of opening a specified file triggered by a user in a main window or an existing sub-window (collectively referred to as a first window) of a WebIDE instance.
[0173] For example, when a user clicks a file in the file bar of the main window, the user intends to open the file but does not specify a window in which to open the file.
[0174] In step 802 , the browser determines whether the designated file has been opened in the first window. If so, step 803 is executed; otherwise, step 804 is executed.
[0175] Specifically, the function module for managing project files in the first window running by the browser can be used for interpretation. If the function module caches information about files opened in the first window, the function module can determine whether the first window has opened the specified file based on the cached information.
[0176] It should be noted that step 802 is an optional step and is not required to be performed. For example, in some cases, this embodiment can skip step 802 and directly perform step 804, that is, the WebIDE server performs the judgment.
[0177] Step 803: The browser displays the content of the designated file in the first window.
[0178] In step 804 , the browser sends a request to the WebIDE server. The request includes information related to the specified file. The request is used to request display of the content of the specified file.
[0179] In step 805 , the WebIDE server determines whether the specified file has been opened in an existing window of the WebIDE instance. If so, step 806 is executed; otherwise, step 808 is executed.
[0180] In step 806 , the WebIDE server sends a first instruction message to the browser. The first instruction message is used to instruct the browser to pin the existing window (eg, the second window) and display the content of the specified file in the second window.
[0181] Step 807: The browser places the second window on top and displays the content of the designated file in the second window.
[0182] It should be understood that multiple windows can be opened on a display screen, and these multiple windows may be stacked and overlapped. When a window is covered by another window, or a portion of a window is blocked by another window, or a window is minimized, the window can be redisplayed by placing the window at the bottom or the minimized window on top. In addition, multiple files can be opened in a window, but the encoding area of the window usually only displays the contents of one file.
[0183] Step 808: The WebIDE server sends a second instruction message to the browser, where the second instruction message is used to instruct the browser to open the specified file in a third window.
[0184] The third window can be a window selected by the WebIDE server, such as the main window, the default window, the window in which the user last operated, the window that triggered the current operation, a new subwindow, etc., without specific limitation. For details, see the description of type (4) (requesting a window for displaying a specified object but not specifying a window for displaying the specified object) in step 207 above, which will not be repeated here. Please note that the third window may also be the first window or the second window.
[0185] Step 809: The browser opens the designated file in the third window and displays the content of the designated file in the third window.
[0186] In step 810 , the WebIDE server updates the status of each change window.
[0187] Optionally, the browser sends window status information to the WebIDE server, where the window status information indicates the changes that have occurred to each window that has changed (referred to as a changed window). The WebIDE server updates the status of each changed window based on the window status information.
[0188] Through the above design, the embodiment of the present application supports multi-window reuse of WebIDE instances, without the need to repeatedly open the same file, and can achieve automatic jumping between windows.
[0189] It should be noted that the above-mentioned embodiment 1 and embodiment 2 are introduced using files as an example. The files in the two embodiments can also be replaced with functional modules. For example, the functional module of the main window can be moved out to a new sub-window. In this way, the user can split the functional modules or files of the main window into other windows, and further drag different windows to different screens to achieve multi-screen operation. Or the functional module of an existing sub-window can be moved out to the main window, or the functional module of an existing sub-window 1 can be moved out to a new or existing sub-window 2, and so on. In this way, the user can change the functional modules and files displayed in each window of the WebIDE instance at his own discretion.
[0190] Example 3:
[0191] FIG9 is a schematic diagram of a process corresponding to the third embodiment. As shown in FIG9 , the process may include the following steps:
[0192] Step 901: The browser receives a code jump instruction triggered by the user in a first window (a main window or an existing sub-window of a WebIDE instance).
[0193] A code jump instruction is used to jump from the current code location to the target code location. The code location can be identified by the file and code address (such as the segment number, line number, etc.). The file to which the current code belongs (referred to as the current file) and the file to which the target code belongs (referred to as the target file) can be the same file or different files. It is worth noting that if the two are the same file, the code jump can be completed within the current window (such as the first window) without involving multiple windows.
[0194] In step 902 , the browser determines whether the target file has been opened in the first window. If so, step 903 is executed; otherwise, step 904 is executed.
[0195] The process of the browser determining in step 902 can be found in the related introduction of the aforementioned 802 and will not be repeated here.
[0196] It should be noted that step 902 is an optional step and is not required to be performed. For example, in some cases, this embodiment can skip step 902 and directly perform step 904, that is, the WebIDE server performs the judgment.
[0197] In step 903 , the browser displays the content of the target file in the first window and jumps to the target code position of the target file to display the corresponding program code.
[0198] In step 904 , the browser sends a request to the WebIDE server, where the request is used to request to jump to the target code location.
[0199] Specifically, the request may include relevant information about the code jump, wherein the relevant information about the code jump may include but is not limited to one or more of the following: the identifier of the first window (the window when the request is triggered), the information of the target file, and the target code location.
[0200] In step 905 , the WebIDE server determines whether the target file is already opened in an existing window (assuming it is the second window) of the WebIDE instance. If so, step 906 is executed; otherwise, step 908 is executed.
[0201] The WebIDE server determines the status of each window in the WebIDE instance based on information such as loaded modules and open files. If the target file is included in the open files of a window, the target file is determined to be open in that window.
[0202] In step 906 , the WebIDE server sends a first response message to the browser. The first response message is used to notify the browser to make the second window on top, display the contents of the target file in the second window, and jump to the target code location of the target file to display the corresponding program code.
[0203] Step 907: After receiving the first response message, the browser sets the second window to the top, displays the content of the target file in the second window, and jumps to the target code position of the target file to display the corresponding program code.
[0204] In step 908 , the WebIDE server sends a second response message to the browser. The second response message is used to notify the browser to open the target file in a third window and jump to the target code location of the target file to display the corresponding program code.
[0205] The third window in step 908 can be found in the related introduction of step 808 and will not be described again here.
[0206] Step 909: After receiving the second response message, the browser displays a third window, opens the target file in the third window, and jumps to the target code position of the target file to display the corresponding program code.
[0207] In step 910 , the WebIDE server updates the status of each change window.
[0208] For step 910, please refer to the relevant introduction of step 810, which will not be repeated here.
[0209] Through the above design, the embodiment of the present application supports code jumping between multiple windows of the WebIDE instance. When the target file is already opened in a window, the program code can be automatically jumped without having to open the file repeatedly. In addition, if the current file and the target file are not in the same window, the user can drag the two windows to different screens, thereby realizing multi-screen code reading and writing, or realizing side-by-side viewing on a single screen, realizing multi-window synchronous reading and writing. It is no longer the case that a WebIDE instance only supports one window, and programming developers cannot edit a WebIDE instance through multiple windows. The embodiment of the present application can significantly improve the work efficiency of programming developers.
[0210] Example 4:
[0211] FIG10 is a schematic diagram of a process corresponding to the fourth embodiment. As shown in FIG10 , the process may include the following steps:
[0212] Step 1001: The browser receives a debugging instruction triggered by a user in a first window (referring to the window where the debugging module is located).
[0213] Figure 11 shows a schematic diagram of the first window. As shown in Figure 11, the user can trigger a debugging instruction in this window, such as clicking the debug button in the menu bar or clicking the debug button in the debugging area, thereby starting the debugging process. During the debugging process, the debugging process calculates the current debugging result, which includes the debugging status of the program being debugged and the values of all debugging variables.
[0214] The debugging results can be displayed in the debugging area. It should be understood that during the debugging process, as the debugged program changes, the debugging results also change continuously.
[0215] Step 1002, when a code jump is triggered during debugging, the browser determines whether the target file is opened in the first window. If so, step 1003 is executed, otherwise, step 1004 is executed.
[0216] The specific process of the browser's interpretation can be found in the relevant introduction of step 802 and will not be repeated here.
[0217] Step 1003: The browser jumps to the target code location in the first window to display the corresponding program code.
[0218] 10 , after step 1003 , step 1008 is executed. Note that if the process jumps from step 1003 to step 1008 , the current window in step 1008 is the first window. If the process jumps from step 1007 to step 1008 , the current window in step 1008 is the second window.
[0219] Step 1004: The browser sends a request to the WebIDE server. The request includes relevant information about code jump, and is used to request to jump to the target code.
[0220] In step 1005 , the WebIDE server determines whether the target file is already opened in an existing window (e.g., the second window) of the WebIDE instance. If so, step 1006 is executed; otherwise, step 1014 is executed.
[0221] In step 1006 , the WebIDE server sends a first response message to the browser regarding the request. The first response message instructs the browser to place the second window on top and jump to the target code location in the second window.
[0222] In step 1007, the browser places the second window on top according to the first response message, displays the content of the target file in the second window, and jumps to the target code position in the second window to display the corresponding program code.
[0223] In step 1008 , the browser determines whether the current window is the window where the debugging module is located (ie, the first window). If so, step 1009 is executed; otherwise, step 1010 is executed.
[0224] Step 1009: The browser renders the debugging status and displays the debugging variables in the current window.
[0225] Step 1010: The browser sends the redirect result to the WebIDE server.
[0226] The jump result includes but is not limited to one or more of the following: information of the window where the debugging module is located, information of the window where the target file is located, information of the target file, target code location, etc.
[0227] Step 1011: The WebIDE server obtains the current debugging result from the debugging process of the WebIDE instance.
[0228] In step 1012, the WebIDE server sends the current debugging result to the browser and notifies the browser to render the debugging status and display the debugging variables in the current window.
[0229] Figure 12 is a schematic diagram of a debugging process provided in an embodiment of the present application. As shown in (a) of Figure 12, assuming that the current file is located in the main window (the window where the debugging module is located) and the target file is located in sub-window 1, when the debugging process triggers a jump from the current code position to the target code position, it will automatically jump to the target code position in sub-window 1, and render the debugging status of the program code corresponding to the target code position in sub-window 1. As shown in (b) of Figure 12, the program code corresponding to the target code position in sub-window 1 is highlighted, and the values of the related debugging variables in the program code corresponding to the target code position can be displayed. The debugging area of the main window can also display the current debugging results.
[0230] In step 1013 , the WebIDE server updates the status of each change window.
[0231] For step 1013, please refer to the relevant introduction of step 810, which will not be repeated here.
[0232] In step 1014, the WebIDE server sends a second response message to the browser. The second response message is used to notify the browser to open the target file in a specified window (such as the third window) and jump to the target code location of the target file to display the corresponding program code.
[0233] The third window in step 1014 can be found in the related introduction of step 808 and will not be described again here.
[0234] In step 1015 , the browser opens the target file in a third window according to the second response message, and jumps to the target code position of the target file to display the corresponding program code.
[0235] It is worth noting that steps 1008 to 1013 must be executed after step 1015. Please note that if the process jumps from step 1003 to step 1012, the current window in steps 1008 to 1012 is the first window. If the process jumps from step 1007 to step 1012, the current window in steps 1008 to 1012 is the second window. If the process jumps from step 1015 to step 1012, the current window in steps 1008 to 1012 is the third window.
[0236] Through the above design, the embodiment of the present application supports the coordinated cooperation between multiple windows of the WebIDE instance for code debugging. During the debugging process, it can automatically jump to the target code and render the corresponding debugging status and display the debugging results. In addition, if the current file and the target file are not in the same window, the user can drag the two windows to different screens to achieve multi-screen code reading, or realize side-by-side viewing on one screen to achieve multi-window synchronous reading. It is no longer the case that a WebIDE instance only supports one window debugging, and programming developers cannot view the complete debugging process of a WebIDE instance through multiple windows. The embodiment of the present application can greatly improve the work efficiency of programming developers.
[0237] It should be noted that the first window in the above-mentioned embodiments 1 to 4 can be a main window, and the second window can be a sub-window, or the first window is a sub-window and the second window is a main window, or the first window is a sub-window and the second window is another sub-window, without specific limitation.
[0238] Based on the same inventive concept as the method embodiment, the present embodiment further provides a WebIDE server 1300, which is used to execute the WebIDE server method described in the method embodiment of Figures 2, 7, 8, 9, or 10. As shown in Figure 13, WebIDE server 1300 includes a receiving module 1301 and a sending module 1302; optionally, the WebIDE server may also include a processing module 1303. Specifically, within WebIDE server 1300, each module is connected via a communication path.
[0239] Receiving module 1301 is used to receive a first request from a web client, where the first request is triggered by a user in a first window of the WebIDE instance displayed on the web client, and is used to request display of specified content of the WebIDE instance; for details, please refer to the description of step 206 in the method embodiment of Figure 2, or the description of step 702 in the method embodiment of Figure 7, or the description of step 804 in the method embodiment of Figure 8, or the description of step 904 in the method embodiment of Figure 9, or the description of step 1004 in the method embodiment of Figure 10, which will not be repeated here.
[0240] Sending module 1302 is configured to send a response message to the web client regarding the first request, the response message instructing the web client to display the specified content in the second window of the WebIDE instance, wherein the first window and the second window are used to display the front-end page corresponding to the WebIDE instance. For details, please refer to the description of step 207 in the method embodiment of FIG2 , or the description of step 704 in the method embodiment of FIG7 , or the description of step 707 in the method embodiment of FIG7 , or the description of step 806 in the method embodiment of FIG8 , or the description of step 908 in the method embodiment of FIG9 , or the description of step 1014 in the method embodiment of FIG10 , which will not be repeated here.
[0241] In one possible implementation, before receiving the first request from the web client, the receiving module 1301 is further used to: receive a second request from the web client, where the second request is used to request creation of the WebIDE instance; for details, please refer to the description of step 201 in the method embodiment of Figure 2, which will not be repeated here.
[0242] The sending module 1302 is further configured to send resource information required for displaying the front-end page corresponding to the WebIDE instance to the web client. Detailed descriptions can be found in step 202 of the method embodiment in FIG2 , which will not be repeated here.
[0243] In one possible implementation, the object to which the specified content belongs includes: at least one functional module included in the front-end page corresponding to the WebIDE instance, and / or at least one project file loaded in the WebIDE instance, wherein each project file includes program code.
[0244] In one possible implementation, the device includes a status of any window included in the WebIDE instance, where the status of each window includes at least one of: an identifier of the window, a level of the window, a functional module included in the window, and information about files opened in the window;
[0245] The receiving module 1301 is further configured to: receive window status information from the web client, wherein the window status information is used to indicate changes in content displayed in each of one or more windows;
[0246] The processing module 1303 updates the state of each of the one or more windows according to the window state information. For details, please refer to the description of step 210 in the method embodiment of FIG2 , or the description of step 706 in the method embodiment of FIG7 , or the description of step 709 in the method embodiment of FIG7 , or the description of step 810 in the method embodiment of FIG8 , or the description of step 910 in the method embodiment of FIG9 , or the description of step 1013 in the method embodiment of FIG10 , which will not be repeated here.
[0247] For example, the implementation of the processing module 1303 in the WebIDE server 1300 is described below. Similarly, the implementation of the receiving module 1301 and the sending module 1302 can refer to the implementation of the processing module 1303.
[0248] When implemented by software, the processing module 1303 may be an application or code block running on a computer device. The computer device may be at least one of a physical host, a virtual machine, a container, and other computing devices. Furthermore, the above-mentioned computer device may be one or more. For example, the processing module 1303 may be an application running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same availability zone (AZ) or in different AZs. The multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. Generally, a region may include multiple AZs.
[0249] Similarly, multiple hosts / virtual machines / containers used to run the application can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Typically, a region can include multiple VPCs, and a VPC can include multiple AZs.
[0250] When implemented in hardware, processing module 1303 may include at least one computing device, such as a server. Alternatively, processing module 1303 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0251] The multiple computing devices included in processing module 1303 can be distributed in the same AZ or in different AZs. The multiple computing devices included in processing module 1303 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in processing module 1303 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0252] It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods. The functional modules in the embodiments of the present application can be integrated into one module, or each module can exist physically separately, or two or more modules can be integrated into one module. For example, the receiving module 1301 and the sending module 1302 are integrated into one module, or the receiving module 1301 and the processing module 1303 are the same module. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0253] This application also provides a computing device 1400. As shown in Figure 14, computing device 1400 includes a bus 1402, a processor 1404, a memory 1406, and a communication interface 1408. Processor 1404, memory 1406, and communication interface 1408 communicate with each other via bus 1402. Computing device 1400 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 1400.
[0254] Bus 1402 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG14 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 1402 may include a path for transmitting information between various components of computing device 1400 (e.g., memory 1406, processor 1404, and communication interface 1408).
[0255] The processor 1404 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0256] The memory 1406 may include volatile memory, such as random access memory (RAM). The memory 1406 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0257] Memory 1406 stores executable program code, which processor 1404 executes to implement the functions of receiving module 1301, sending module 1302, and processing module 1303, thereby implementing the WebIDE instance management method. Specifically, memory 1406 stores instructions for the WebIDE server 1300 to execute the WebIDE instance management method provided herein.
[0258] The communication interface 1408 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 1400 and other devices or a communication network.
[0259] The present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device may be a server. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smartphone.
[0260] As shown in Figure 15, the computing device cluster includes at least one computing device 1400. The memory 1406 in one or more computing devices 1400 in the computing device cluster may store the same instructions for executing the WebIDE instance management method.
[0261] In some possible implementations, the memory 1406 of one or more computing devices 1400 in the computing device cluster may also store partial instructions for executing the WebIDE instance management method. In other words, the combination of one or more computing devices 1400 can jointly execute the instructions for executing the WebIDE instance management method.
[0262] It should be noted that the memory 1406 in different computing devices 1400 in the computing device cluster can store different instructions, each for performing a portion of the functions of the computing device. In other words, the instructions stored in the memory 1406 in different computing devices 1400 can implement the functions of one or more of the receiving module 1301, the sending module 1302, and the processing module 1303.
[0263] In some possible implementations, one or more computing devices in a computing device cluster may be connected via a network. The network may be a wide area network (WAN) or a local area network (LAN), among others. FIG. 16 illustrates a possible implementation. As shown in FIG. 16 , two computing devices 1400A and 1400B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 1406 in the computing device 1400A stores instructions for executing the functions of the receiving module 1301 and the sending module 1302. Simultaneously, the memory 1406 in the computing device 1400B stores instructions for executing the functions of the processing module 1303.
[0264] It should be understood that the functionality of the computing device 1400A shown in FIG16 may also be implemented by multiple computing devices 1400. Similarly, the functionality of the computing device 1400B may also be implemented by multiple computing devices 1400.
[0265] The present application also provides another computing device cluster. The connection relationship between the computing devices in this computing device cluster can be similar to the connection method of the computing device cluster described in Figures 15 and 16. The difference is that the memory 1406 of one or more computing devices 1400 in this computing device cluster can store the same instructions for executing the WebIDE instance management method.
[0266] In some possible implementations, the memory 1406 of one or more computing devices 1400 in the computing device cluster may also store partial instructions for executing the WebIDE instance management method. In other words, the combination of one or more computing devices 1400 can jointly execute the instructions for executing the WebIDE instance management method.
[0267] Embodiments of the present application also provide a computer program product comprising instructions. The computer program product may be software or a program product comprising instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the resource management method.
[0268] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device, or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the resource management method.
[0269] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, which is not specifically limited in the embodiments of the present application.
[0270] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0271] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0272] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0273] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0274] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0275] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
[0276] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A WebIDE instance management method, characterized in that: The method is applied to a system including a web client and an online integrated development environment WebIDE server, wherein the WebIDE server is used to provide services for a WebIDE instance, and the web client is used to display a front-end page corresponding to the WebIDE instance through one or more windows. The method includes: The web client sends a request to the WebIDE server in response to a preset operation triggered by a user on a specified object in the first window of the WebIDE instance, wherein the request is used to request that the specified object be displayed in a manner indicated by the preset operation; After receiving the request, the WebIDE server sends a response message to the client for the request, where the response message is used to instruct to display the specified object in the second window of the WebIDE instance; The web client displays the second window and presents the designated object in the second window according to the response message.
2. The method according to claim 1, characterized in that The specified object includes: at least one functional module included in the front-end page corresponding to the WebIDE instance, and / or at least one file loaded in the WebIDE instance.
3. The method according to claim 1 or 2, characterized in that The preset operation includes: Drag the designated object displayed in the first window to a blank area outside the first window or to the second window; or, input or select a designated command in the first window, the designated command is used to instruct to display the designated object in the second window; or, specify a shortcut key operation, the shortcut key operation is used to instruct to display the designated object in the second window; The request is used to request to call the second window to display the specified object; wherein the second window is an existing window or a new window of the WebIDE instance.
4. The method according to claim 1 or 2, characterized in that: If the preset operation does not specify a window for displaying the specified object; Before the WebIDE server sends a response message to the web client regarding the request, the method further includes: The WebIDE server determines, based on the window status information of the WebIDE instance, that the specified object is already opened in the second window; or determines that the specified object is not opened in the first window; The window status information of the WebIDE instance includes the status of each window of one or more windows of the WebIDE instance, and the status of a window includes at least one of: an identifier of the window, a level of the window, a functional module included in the window, and information of a file opened in the window.
5. The method according to claim 4, characterized in that The preset operation is used to open a specified file, and the request is used to request to open the specified file; or The preset operation includes triggering a code jump instruction in the first window, and the request is used to request to jump to a target code position of a designated file indicated by the code jump instruction.
6. The method according to claim 5, characterized in that The code jump instruction is generated during the code debugging process; The method further comprises: The WebIDE server sends instruction information to the web client, where the instruction information is used to instruct to display the debugging result corresponding to the target code in the second window, where the target code refers to the program code corresponding to the target code position.
7. The method according to any one of claims 4 to 6, characterized in that: After the web client displays the designated object in the second window, the web client further includes: The WebIDE server updates the status of the second window.
8. A WebIDE instance management method, characterized in that: The method is applied to the WebIDE server, which is in communication with a web client, wherein the WebIDE server is used to provide services for the WebIDE instance, and the web client is used to display a front-end page corresponding to the WebIDE instance through one or more windows, and the method includes: Receiving a request from the web client, wherein the request is triggered by a user in a first window of the WebIDE instance displayed by the web client, and is used to request that a specified object of the WebIDE instance be displayed in an indicated manner; A response message for the request is sent to the web client, wherein the response message instructs the web client to display the specified object in a second window of the WebIDE instance.
9. The method according to claim 8, characterized in that The specified object includes: at least one functional module included in the front-end page corresponding to the WebIDE instance, and / or at least one file loaded in the WebIDE instance.
10. The method according to claim 8 or 9, characterized in that If the request does not specify a window for displaying the specified object; Before the WebIDE server sends a response message to the web client regarding the request, the method further includes: The WebIDE server determines, based on the window status information of the WebIDE instance, that the specified object is already opened in the second window; or determines that the specified object is not opened in the first window; The window status information of the WebIDE instance includes the status of each window of one or more windows of the WebIDE instance, and the status of a window includes at least one of: an identifier of the window, a level of the window, a functional module included in the window, and information of a file opened in the window.
11. The method according to claim 10, characterized in that The method further comprises: The WebIDE server updates the status of the second window.
12. A WebIDE instance management device, characterized in that: The device comprises: A receiving module, configured to receive a request from the web client, wherein the request is triggered by a user in a first window of the WebIDE instance displayed by the web client, and is configured to request that a specified object of the WebIDE instance be displayed in an indicated manner; The sending module is used to send a response message to the request to the web client, wherein the response message instructs the web client to display the specified object in the second window of the WebIDE instance.
13. The device according to claim 12, characterized in that The specified object includes: at least one functional module included in the front-end page corresponding to the WebIDE instance, and / or at least one file loaded in the WebIDE instance.
14. The device according to claim 12 or 13, characterized in that The device also includes a determination module; If the request does not specify a window for displaying the specified object, before the sending module sends a response message to the web client for the request, the determining module is further configured to: Determining, according to the window status information of the WebIDE instance, that the specified object is already opened in the second window; or determining that the specified object is not opened in the first window; The window status information of the WebIDE instance includes the status of each window of one or more windows of the WebIDE instance, and the status of a window includes at least one of: an identifier of the window, a level of the window, a functional module included in the window, and information of a file opened in the window.
15. The device according to any one of claims 14, characterized in that The device also includes an update module; The updating module is used to update the status of the second window of the WebIDE instance.
16. A WebIDE instance management system, characterized in that: The system includes a web client and an online integrated development environment WebIDE server, wherein: The web client is used to execute the method described in the method executed by the web client as claimed in any one of claims 1 to 7; The WebIDE server is used to execute the method described in the method executed by the WebIDE server as described in any one of claims 1 to 7.
17. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method executed by the WebIDE server as described in any one of claims 1 to 7, or executes the method as described in any one of claims 8 to 11.
18. A computer program product comprising instructions, characterized in that When the instruction is executed by the computing device cluster, the computing device cluster executes the method executed by the WebIDE server as described in any one of claims 1 to 7, or executes the method as described in any one of claims 8 to 11.
19. A computer-readable storage medium, characterized in that: The method comprises computer program instructions, which, when executed by a computing device cluster, enable the computing device cluster to execute the method executed by the WebIDE server as described in any one of claims 1 to 7, or to execute the method as described in any one of claims 8 to 11.
Citation Information
Patent Citations
Concurrent debugging rendering method and device of script
CN108280027A
File processing method and device, computer equipment and storage medium
CN112667224A
Communication method and device, computer equipment and storage medium
CN114079653A
WebIDE container management method, WebIDE container management device and computer storage medium
CN115437710A
Hardware device debugging method, device and system
WO2016029792A1
