Project creation method and device and storage medium
Through plug-ins with built-in project templates in the integrated development environment, the problem that existing plug-ins cannot create fast application projects on IDEA and Android Studio is solved, and project creation and management functions in multiple integrated development environments are implemented.
Patent Information
- Application Number
- CN202311236764.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-03-25
AI Technical Summary
The existing aiot-ide-project plug-in can only be installed and used on Vs Code software, and cannot create quick application projects and manage projects on IDEA and Android Studio.
Create a target project by building in the target project template in the plug-in pre-created in the first integrated development environment, obtain project information, call the template file replacement engine, replace the replacement file in the template, and copy the file to the target path.
It realizes the creation of fast application projects and project management in integrated development environments such as IDEA and Android Studio, expands the functions of the integrated development environment, is easy for developers to use, and simplifies the project management process.
Smart Images

Figure CN119690424A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of software development, and in particular to a method, device and storage medium for creating a project. Background Art
[0002] In the process of software front-end development, a variety of integrated development environments are needed. An integrated development environment (IDE) is an application used to provide a program development environment, generally including a code editor, compiler, debugger, and graphical user interface tool. It integrates an integrated development software service suite that includes code writing, analysis, compilation, and debugging functions. Among them, IDEA (IntelliJ IDEA) is a widely used integrated development environment for the Java programming language that supports a variety of programming languages and technologies, such as Java, Kotlin, Android, etc. Among them, IDEA plug-ins can extend IDE functions and provide additional tools, shortcut keys, editors, code checking, and other functions. IDEA provides a variety of plug-ins that can help developers use IDEA for coding more efficiently and conveniently.
[0003] In the related art, Vs Code (Visual Studio Code) is a cross-platform source code editor for writing modern Web and cloud applications. There is an aiot-ide-project plug-in on Vs Code, which is a project plug-in for aiot-ide. It provides project initialization function for aiot-ide. Through the plug-in, projects and quick application projects of the IoT embedded software platform based on the open source real-time operating system NuttX can be created and opened. This plug-in can only be installed and used on Vs Code software, and cannot create quick application projects and manage projects on IDEA and Android Studio (Android Integrated Development Tool) software. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method, device and storage medium for project creation.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a project creation method, comprising:
[0006] In response to determining that a target project needs to be created in a first integrated development environment, project information of the target project is obtained, where the target project is a project that supports creation in a second integrated development environment; based on a pre-created plug-in, a target project template that matches the project information is determined, where the plug-in has a built-in project template; based on the target project template, the target project is created in the first integrated environment.
[0007] In one embodiment, creating the target project in the first integrated environment based on the target project template includes: calling a template file replacement engine to replace the replacement file in the target project template; obtaining the non-replacement file in the data package corresponding to the target project template based on the file system object created in the plug-in; and copying the replacement file and the non-replacement file to the target path of the first integrated environment to create the target project.
[0008] In one embodiment, the determination to create a target project in the first integrated development environment includes: in response to detecting a project creation instruction on a user operation interface, displaying a first interface in a pop-up window, wherein the first interface is used to guide the user to input project information and is provided with a first button, wherein the first button is used to trigger the creation of the target project; if it is detected that the input of accurate project information of the target project is completed in the first interface, setting the first button on the first interface to an operable state; in response to detecting an operation on the first button, determining that the target project needs to be created in the first integrated development environment.
[0009] In one embodiment, obtaining the project information of the target project includes at least one of the following: obtaining the project name input by the user at the project name input interface of the first interface; obtaining the package name input by the user at the package name input interface of the first interface; obtaining the path input by the user at the path setting interface of the first interface; obtaining the project type selected to be created by the user at the project type selection interface of the first interface; obtaining the target project template type selected by the user at the project template type selection interface of the first interface.
[0010] In one embodiment, the method further includes: in response to detecting that a modified package name is input into the package name input interface of the first interface and detecting that a project name is input into the project name input interface of the first interface, keeping the modified package name unchanged; or in response to detecting that a modified project name is input into the project name input interface of the first interface, controlling the package name of the package name input interface to change following the modified project name.
[0011] In one implementation, the method further includes: if creating the target project requires executing a script file, creating a thread for running the script file, and executing the script file based on the thread.
[0012] In one embodiment, the method further comprises:
[0013] During the execution of the script file, the animation is displayed on the current display interface, and after the script file finishes running, the animation stops being displayed.
[0014] In one implementation, the first integrated development environment includes: IDEA development environment.
[0015] In one implementation, the target project includes: a quick application project.
[0016] According to a second aspect of an embodiment of the present disclosure, there is provided a project creation device, including:
[0017] An acquiring unit, configured to acquire project information of a target project in response to determining that a target project needs to be created in the first integrated development environment, wherein the target project is a project that supports creation in the second integrated development environment;
[0018] A determination unit, configured to determine a target project template matching the project information based on a pre-created plug-in, wherein the plug-in has a built-in project template;
[0019] A creating unit is used to create the target project in the first integrated environment based on the target project template.
[0020] In one embodiment, the creation unit creates the target project in the first integrated environment based on the target project template in the following manner: calling a template file replacement engine to replace the replacement file in the target project template; obtaining the non-replacement file in the data package corresponding to the target project template based on the file system object created in the plug-in; and copying the replacement file and the non-replacement file to the target path of the first integrated environment to create the target project.
[0021] In one embodiment, the acquisition unit determines to create a target project in the first integrated development environment in the following manner: in response to detecting a project creation instruction on a user operation interface, a first interface is displayed in a pop-up window, the first interface is used to guide the user to input project information, and a first button is provided, the first button is used to trigger the creation of the target project; if it is detected that the input of accurate project information of the target project is completed in the first interface, the first button on the first interface is set to an operable state; in response to detecting an operation on the first button, it is determined that the target project needs to be created in the first integrated development environment.
[0022] In one embodiment, the acquisition unit acquires the project information of the target project in the following manner, including at least one of the following: acquiring the project name input by the user at the project name input interface of the first interface; acquiring the package name input by the user at the package name input interface of the first interface; acquiring the path input by the user at the path setting interface of the first interface; acquiring the project type selected to be created by the user at the project type selection interface of the first interface; acquiring the target project template type selected by the user at the project template type selection interface of the first interface.
[0023] In one embodiment, the acquisition unit is also used for: in response to detecting that a modified package name is input into the package name input interface of the first interface and detecting that a project name is input into the project name input interface of the first interface, keeping the modified package name unchanged; or in response to detecting that a modified project name is input into the project name input interface of the first interface, controlling the package name of the package name input interface to change following the modified project name.
[0024] In one implementation, the creation unit is further configured to: if creating the target project requires executing a script file, create a thread for running the script file, and execute the script file based on the thread.
[0025] In one implementation, the creation unit is further configured to: display an animation on the current display interface during execution of the script file, and stop displaying the animation after the script file finishes running.
[0026] In one implementation, the first integrated development environment includes: IDEA development environment.
[0027] In one implementation, the target project includes: a quick application project.
[0028] According to a third aspect of an embodiment of the present disclosure, there is provided a project creation device, characterized in that it includes:
[0029] processor;
[0030] a memory for storing processor-executable instructions;
[0031] The processor is configured to: execute the project creation method described in the first aspect or any one of the implementations of the first aspect.
[0032] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, characterized in that instructions are stored in the storage medium, and when the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the project creation method described in the first aspect or any one of the embodiments of the first aspect.
[0033] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: by pre-creating a plug-in on the first integrated development environment, the required project template is built into the plug-in, so that the target project can be created on the first integrated development environment and the second integrated development environment. The present disclosure can expand the function of creating quick application projects on the first integrated development environment and the second integrated development environment. The present disclosure can support the selection of different types of project templates to create quick application projects, facilitate developers to use, simplify the process of project management, and complete the creation of projects through visual operations.
[0034] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0036] Figure 1 The figure is a flowchart of a project creation method according to an exemplary embodiment.
[0037] Figure 2 The figure is a flowchart showing a method for creating a target project according to an exemplary embodiment.
[0038] Figure 3 The present invention is a flowchart showing a method for determining to create a target project according to an exemplary embodiment.
[0039] Figure 4 It is a schematic diagram of a UI interaction interface according to an exemplary embodiment.
[0040] Figure 5 The present invention is a flowchart showing a method for linking a user input error prompt and a project name with a package name according to an exemplary embodiment.
[0041] Figure 6 The present invention is a flowchart showing a method for linking a project name with a package name according to an exemplary embodiment.
[0042] Figure 7 The figure is a flowchart showing a method for creating a target project according to an exemplary embodiment.
[0043] Figure 8 The invention is a block diagram of a device for creating a project according to an exemplary embodiment.
[0044] Fig. 9 The invention is a block diagram of a device for creating a project according to an exemplary embodiment.
[0045] Fig.10 The invention is a block diagram of a device for creating a project according to an exemplary embodiment. DETAILED DESCRIPTION
[0046] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0047] During software development, you need to use a variety of integrated development environments. An integrated development environment is an application that provides a program development environment. It integrates code writing, analysis, compilation, debugging, and other integrated development software service packages. Android Studio software can create project templates for multiple programming languages, but it lacks template creation and project management for quick application projects. IDEA is a commonly used Java integrated development environment that supports multiple programming languages and technologies. Among them, IDEA plug-ins can expand the functions of the integrated development environment and realize more functions.
[0048] In the related technology, there is an aiot-ide-project plug-in on Vs Code, which can provide the initialization function of Vela projects and quick application projects. Projects can be created and opened through the plug-in. The plug-in is implemented using JS (JavaScript, a literally interpreted scripting language) technology and can only be installed and used on Vs Code software. The technical solution of the aiot-ide-project plug-in is to use the open API (Application Programming Interface) provided by Vs Code to obtain various functions of the editor, thereby extending the editor and providing users with the function of creating quick applications. However, this plug-in can only be used on the Vs Code editor, and cannot create quick application projects on IDEA and Android Studio software.
[0049] In view of this, the present disclosure proposes a method for implementing project creation in an integrated development environment by embedding the required project template into a pre-created plug-in. The present disclosure can expand the function of creating projects on an integrated development environment and implement project management, simplify the process of project management, facilitate software development, and achieve user-friendly interaction.
[0050] Figure 1 is a flowchart of a project creation method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:
[0051] In step S11 , in response to determining that a target project needs to be created in the first integrated development environment, project information of the target project is acquired, where the target project is a project that supports creation in the second integrated development environment.
[0052] In the disclosed embodiment, the first integrated development environment may be IDEA, and the second development environment may be Android Studio. Android Studio is obtained based on the extension of IDEA. Based on this, the project creation method can create a project on IDEA, and can also support the creation of a project on Android Studio.
[0053] In step S12, based on the pre-created plug-in, a target project template matching the project information is determined, and the plug-in has a built-in project template.
[0054] In the disclosed embodiment, the target project can be a project of an IoT embedded software platform based on the open source real-time operating system NuttX, or a QuickApp project. Based on this, the project template can be a project template of an IoT embedded software platform based on the open source real-time operating system NuttX, or a QuickApp project template. Depending on the type of project you want to create, the built-in project template in the plug-in is also different.
[0055] In the disclosed embodiment, the project template is built into the plug-in project, so that the project creation function can be provided even without a network connection.
[0056] In step S13, a target project is created in the first integrated environment based on the target project template.
[0057] In the disclosed embodiment, to create a target project, it is necessary to call a project template built into the plug-in.
[0058] In the disclosed embodiment, the target project template is placed in a pre-created plug-in, so that the target project can be created in an integrated environment, thereby expanding the function of the integrated development environment.
[0059] Figure 2 is a flowchart of a method for creating a target project according to an exemplary embodiment. Figure 2 As shown, the following steps are included:
[0060] In step S21, the template file replacement engine is called to replace the replacement file in the target project template.
[0061] In the disclosed embodiment, the template file replacement engine may be an extended freemarker.template.Configuration class, and the template file replacement engine may complete the template file replacement by setting the file information to be replaced in the template and calling the class method.
[0062] In step S22, based on the file system object created in the plug-in, the non-replacement files in the data package corresponding to the target project template are obtained.
[0063] In the disclosed embodiment, the non-replacement file can create a file system object from the zip package (compressed package) of the plug-in through FileSystems.newFileSystem, and read the specified file in the jar package from the file system object and place it under the created target project path.
[0064] In step S23, the replacement files and the non-replacement files are copied to the target path of the first integrated environment to create a target project.
[0065] In the embodiment of the present disclosure, when creating a target project, the target project template can be called through the target path of the first integrated environment to create the target project.
[0066] In the disclosed embodiment, a replacement file of a file in a target template is replaced by a template file replacement engine, and the obtained non-replacement file and the replacement file are copied to a target path, so that a template corresponding to the target project can be obtained and the template corresponding to the target project can be called through the target path, thereby expanding the functionality of the integrated development environment.
[0067] Figure 3 is a flowchart showing a method for determining to create a target project according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0068] In step S31, in response to detecting a command to create a project on the user operation interface, a first interface is displayed in a pop-up window. The first interface is used to guide the user to input project information and is provided with a first button for triggering the creation of a target project.
[0069] In the disclosed embodiment, the project creation can be started by monitoring whether the button on the missile window is allowed to be clicked and whether it is clicked. The first button can be a "Finish" button. Clicking the "Finish" button triggers the on FINISH hook, that is, triggering the project creation state. After the trigger, the creation state is entered, and the panel information of the specific Tab of the project missile window is obtained, that is, the project information entered by the user.
[0070] In step S32, if it is detected that the input of accurate project information of the target project is completed in the first interface, the first button on the first interface is set to an operable state.
[0071] In the embodiment of the present disclosure, accurate project information may be that the input text information does not contain illegal characters. The first interface may be a UI interactive interface. When the input text information does not contain illegal characters, the "Done" button is set to be available, and it can be further determined whether the package name needs to be modified. If the judgment result is yes, the package name is modified. If the judgment result is no, the package name is not modified.
[0072] In step S33, in response to detecting the operation of the first button, it is determined that a target project needs to be created in the first integrated development environment.
[0073] In the embodiment of the present disclosure, if the first button is clicked, the project creation state is triggered, and it can be determined that the target project needs to be created in the first integrated development environment. If the first button is not clicked, the project creation state is not triggered.
[0074] In the embodiment of the present disclosure, by setting the first button to determine that a target project needs to be created in the first integrated development environment, project creation is made more convenient and friendly interaction with the user can also be performed.
[0075] Figure 4 is a schematic diagram of a UI interaction interface according to an exemplary embodiment. Figure 4 As shown, including:
[0076] First, use the API provided by Android Studio to create an Action to trigger the creation of a pop-up window. This pop-up window is implemented based on the WizardDialog class. The creation steps in the wizard are implemented by the WizardStep class. If multiple steps are required, this class can be used. The wizard content includes:
[0077] Title—New Project, used to indicate a new target project. Select the target project template. You can select the corresponding project template according to the type of project you want to create. You can choose to create a project or QuickApp project based on the open source real-time operating system NuttX IoT embedded software platform. Project name input interface, you can enter the project name according to the target project you want to create. Package name input interface, you can enter the package name according to the target project you want to create. Save path, you can enter the target path you want to save according to the target project you want to create.
[0078] The buttons at the bottom of the UI are: Previous button, used to trigger the return to the previous step. Next button, used to trigger the next step. Done button, used to trigger the creation of the target file. Cancel button, used to cancel the operation. Help button, used to view some usage rules.
[0079] In the disclosed embodiment, the UI interactive interface on the project missile window can use the low-code component library provided on IDEA to obtain basic components, and implement the initialization of layout and component values through relevant codes. Among them, the most important component is JTabbedPane (tab panel), which is used to implement the switching function of the IoT embedded software platform built on the left based on the open source real-time operating system NuttX and QuickApp.
[0080] In the disclosed embodiment, when interacting with the user during the creation process, listener events such as addChangeListener, addDocumentListener, addFocusListener, etc. can be used to complete functions such as prompts for user input errors, linkage between project names and package names, etc.
[0081] Figure 5 is a flowchart of a method for linking a user input error prompt, a project name, and a package name according to an exemplary embodiment. Figure 5 As shown, the following steps are included:
[0082] In step S51, the user inputs text.
[0083] In step S52, it is determined whether illegal characters are input into the text.
[0084] In step S53, if it is determined that illegal characters are input in the text, the package name is not modified and the Finish button is set to be unavailable.
[0085] In the disclosed embodiment, when there are illegal characters in the text, the Set Complete button is unavailable, that is, the package name cannot be modified.
[0086] In step S54, if it is determined that no illegal characters are input in the text, it is further determined whether the package name needs to be modified, and the Finish button is set to be available.
[0087] In the disclosed embodiment, when there are no illegal characters in the text, the Set Complete button is available, and further determination can be made to confirm whether the package name needs to be modified.
[0088] In step S55, if the judgment result is yes, the package name is modified.
[0089] In the disclosed embodiment, when there are no illegal characters in the text, the Set Complete button is available. If the judgment result is yes, the package name is modified. The package name after the modification operation has nothing to do with the change of the project name.
[0090] In step S56, if the judgment result is no, the package name is not modified.
[0091] In the disclosed embodiment, when there are no illegal characters in the text, the setting completion button is available. If the judgment result is no, the package name is not modified. The package name that has not been modified is related to the change of the project name. If the project name changes, the package name will change accordingly.
[0092] In the disclosed embodiment, user-friendly interaction is achieved through functions such as prompts for user input errors and linkage between project names and package names.
[0093] In the embodiment of the present disclosure, obtaining the project information of the target project includes at least one of the following:
[0094] Get the project name entered by the user in the project name input interface of the first interface.
[0095] In the disclosed embodiment, the project name is related to the user input, and the project name changes when the user input information changes.
[0096] Get the package name entered by the user in the package name input interface of the first interface.
[0097] In the disclosed embodiment, the package name is not modified, which is related to the project name. If the project name changes, the package name changes accordingly. If the project name remains unchanged, the package name remains unchanged. The modified package name has nothing to do with the project name. If the project name changes, the package name remains unchanged.
[0098] Get the path entered by the user in the path setting interface of the first interface.
[0099] In the disclosed embodiment, an input path is obtained, and during the project creation process, a project template built into a pre-set plug-in can be called through the input path.
[0100] Get the project type that the user selects to create in the project type selection interface of the first interface.
[0101] In the disclosed embodiment, the created project type may be a project of an IoT embedded software platform built based on the open source real-time operating system NuttX, or may be a QuickApp project.
[0102] Get the target project template type selected by the user in the project template type selection interface of the first interface.
[0103] In the disclosed embodiment, the target project template type corresponds to the project type selected to be created, and may be a project template of an IoT embedded software platform built based on the open source real-time operating system NuttX, or may be a QuickApp project template.
[0104] In the disclosed embodiment, the target project information is obtained through the first interface, and user-friendly interaction is performed, which also makes project creation more convenient.
[0105] Figure 6 is a flowchart showing a method for linking a project name with a package name according to an exemplary embodiment. Figure 6 As shown, the following steps are included:
[0106] In step S61, in response to detecting that a modified package name is input into the package name input interface of the first interface and detecting that a project name is input into the project name input interface of the first interface, the modified package name is kept unchanged.
[0107] In the disclosed embodiment, after the package name is operated, if the input project name is changed, the package name is not related to the change of the project name, that is, the package name remains unchanged.
[0108] In step S62, in response to detecting that a modified project name is input at the project name input interface of the first interface, the package name of the package name input interface is controlled to change following the modified project name.
[0109] In the disclosed embodiment, if the package name is not operated, and the input project name changes, the package name is related to the change of the project name, that is, the package name changes with the change of the project name.
[0110] In the disclosed embodiment, by realizing the function of linking the project name with the package name, friendly interaction with the user is achieved.
[0111] In the disclosed embodiment, the project information of the target project is obtained, and based on the pre-created plug-in, a target project template matching the project information is determined, and the target project is created based on the target project template. The target project creation flow chart is as follows: Figure 7 shown.
[0112] Figure 7 is a flowchart of a method for creating a target project according to an exemplary embodiment. Figure 7 As shown, the following steps are included:
[0113] In step S71, click the menu bar, click File-New-New, and then click File / Quick App of the IoT embedded software platform built based on the open source real-time operating system NuttX, and a pop-up window will pop up.
[0114] In the disclosed embodiment, click the menu bar on the first integrated development environment interface, click File, and then click New. According to the target project you want to create, select New and click a file or Quick App file of the IoT embedded software platform built based on the open source real-time operating system NuttX, and a new project pop-up window will pop up.
[0115] In step S72, select the project type to be created (project / Quick App of the IoT embedded software platform built based on the open source real-time operating system NuttX).
[0116] In the disclosed embodiment, according to the target project to be created, select and click to create a new Vela file or a Quick App file.
[0117] In step S73, a project panel of an IoT embedded software platform built based on the open source real-time operating system NuttX is displayed.
[0118] In the disclosed embodiment, if you click on a file to create an IoT embedded software platform based on the open source real-time operating system NuttX, the project panel of the IoT embedded software platform based on the open source real-time operating system NuttX will be displayed.
[0119] In step S74, the Quick App item panel is displayed.
[0120] In the disclosed embodiment, if you click on Create a New Quick App file, the Quick App project panel will be displayed.
[0121] In step S75, a project template type is selected.
[0122] In the disclosed embodiment, if you click to create a new file for an IoT embedded software platform built based on the open source real-time operating system NuttX, and the project panel of the IoT embedded software platform built based on the open source real-time operating system NuttX is displayed, then the project template of the IoT embedded software platform built based on the open source real-time operating system NuttX is selected; if you click to create a new Quick App file, and the Quick App project panel is displayed, then the Quick App project template is selected.
[0123] In step S76, a project name is input.
[0124] In the embodiment of the present disclosure, the project name is obtained based on the user input of the UI interaction interface.
[0125] In step S77, a project package name is input.
[0126] In the disclosed embodiment, if the project package name is not modified, the project package name is related to the project name. If the project name changes, the project package name changes accordingly. If the project name does not change, the project package name does not change. If the project package name is modified, the project package name is unrelated to the project name. If the project name changes, the project package name does not change.
[0127] In step S78, a project path is selected.
[0128] In the embodiment of the present disclosure, a project information saving path is selected, and when a project is created, a project template can be called through the project path to realize the creation of the project.
[0129] In step S79, a project is created.
[0130] In the disclosed embodiment, project creation is achieved by embedding the target project template into a pre-set plug-in, and friendly interaction with the user is performed through a UI interaction interface.
[0131] In the disclosed embodiment, if the creation of the target project requires the execution of a script file, a thread for running the script file is created, and the script file is executed based on the thread.
[0132] In the disclosed embodiment, the target project can be a Quick App project or a project of an IoT embedded software platform built based on the open source real-time operating system NuttX. If the target project is a project of an IoT embedded software platform built based on the open source real-time operating system NuttX, then creating a project of an IoT embedded software platform built based on the open source real-time operating system NuttX requires running a script. The execution of the script requires opening up a new thread, and the script file can be executed through the Process class.
[0133] In the disclosed embodiment, according to the need of creating a target project, for example, the target project needs to run a script, a corresponding new thread is constructed, and an execution tool is called to execute the script file, which can well meet the needs of creating different target projects in an integrated development environment.
[0134] In the disclosed embodiment, during the execution of the script file, an animation is displayed on the current display interface, and after the script file finishes running, the animation stops being displayed.
[0135] In the disclosed embodiment, if the target project is a project of an IoT embedded software platform built based on the open source real-time operating system NuttX, then creating a project of an IoT embedded software platform built based on the open source real-time operating system NuttX requires running a script. Display animation can be added during the execution of the project script of the IoT embedded software platform built based on the open source real-time operating system NuttX. The display animation can be implemented by using Task.Modal. After the display animation is successfully added, a task pop-up window will pop up to monitor the progress of the script execution. After the script file finishes running, the display animation will be stopped and closed.
[0136] In the disclosed embodiment, by adding display animation during script execution, the script progress can be understood, and friendly interaction with the user can be achieved.
[0137] In the embodiment of the present disclosure, the first integrated development environment includes: IDEA development environment.
[0138] In the embodiment of the present disclosure, creating the target project in the first integrated development environment may be creating the target project in the IDEA integrated development environment.
[0139] In the disclosed embodiment, IDEA is a commonly used Java integrated development environment that can support multiple programming languages and technologies. Creating a plug-in in IDEA can expand the functions of the integrated development environment and realize more functions.
[0140] In the disclosed embodiment, the target project includes: a quick application project.
[0141] In the embodiment of the present disclosure, creating a target project may be creating a quick application project or creating a Vela project.
[0142] In the embodiments of the present disclosure, it is possible to create a target project in an integrated development environment, and to extend the function of creating a quick application project in the integrated development environment.
[0143] Based on the same concept, the embodiment of the present disclosure also provides a project creation device.
[0144] It is understandable that the project creation device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0145] Figure 8 is a block diagram of a project creation device according to an exemplary embodiment. Figure 8 The device 100 includes an acquiring unit 101, a determining unit 102 and a creating unit 103.
[0146] The acquisition unit 101 is used to acquire project information of the target project in response to determining that a target project needs to be created in the first integrated development environment, where the target project is a project that supports creation in the second integrated development environment.
[0147] In one embodiment, the acquisition unit 101 determines to create a target project in the first integrated development environment in the following manner: in response to detecting a command to create a project on a user operation interface, a first interface is displayed in a pop-up window, the first interface is used to guide the user to input project information, and a first button is provided, and the first button is used to trigger the creation of the target project. If it is detected that the input of accurate project information of the target project is completed in the first interface, the first button on the first interface is set to an operable state. In response to detecting an operation on the first button, it is determined that the target project needs to be created in the first integrated development environment.
[0148] In one embodiment, the acquisition unit 101 acquires the project information of the target project in the following manner, including at least one of the following: acquiring the project name input by the user at the project name input interface of the first interface. Acquiring the package name input by the user at the package name input interface of the first interface. Acquiring the path input by the user at the path setting interface of the first interface. Acquiring the project type selected to be created by the user at the project type selection interface of the first interface. Acquiring the target project template type selected by the user at the project template type selection interface of the first interface.
[0149] In one embodiment, the acquisition unit 101 is further configured to: in response to detecting that a modified package name is input into the package name input interface of the first interface and detecting that a project name is input into the project name input interface of the first interface, keep the modified package name unchanged. Or in response to detecting that a modified project name is input into the project name input interface of the first interface, control the package name of the package name input interface to change following the modified project name.
[0150] The determination unit 102 is used to determine a target project template matching the project information based on a pre-created plug-in, wherein the plug-in has a built-in project template.
[0151] The creating unit 103 is configured to create a target project in the first integrated environment based on the target project template.
[0152] In one embodiment, the creation unit 103 creates a target project in the first integrated environment based on the target project template in the following manner: calling a template file replacement engine to replace the replacement file in the target project template. Based on the file system object created in the plug-in, obtaining the non-replacement file in the data package corresponding to the target project template. Copying the replacement file and the non-replacement file to the target path of the first integrated environment to create the target project.
[0153] In one implementation, the creation unit 103 is further configured to: if the creation of the target project requires the execution of a script file, create a thread for running the script file, and execute the script file based on the thread.
[0154] In one implementation, the creation unit 103 is further configured to: display an animation on the current display interface during the execution of the script file, and stop displaying the animation after the script file finishes running.
[0155] In one implementation, the first integrated development environment includes: IDEA development environment.
[0156] In one implementation, the target project includes: a quick application project.
[0157] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0158] Fig. 9 2 is a block diagram of an apparatus 200 for project creation according to an exemplary embodiment. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0159] Reference Fig. 9 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .
[0160] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.
[0161] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0162] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.
[0163] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0164] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.
[0165] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0166] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0167] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0168] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0169] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0170] Fig.10 is a block diagram of an apparatus 300 for project creation according to an exemplary embodiment. For example, the apparatus 300 may be provided as a server. Fig.10 , the apparatus 300 includes a processing component 322, which further includes one or more processors, and a memory resource represented by a memory 332 for storing instructions, such as an application, that can be executed by the processing component 322. The application stored in the memory 332 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 322 is configured to execute the instructions to perform the above method.
[0171] The device 300 may also include a power supply component 326 configured to perform power management of the device 300, a wired or wireless network interface 350 configured to connect the device 300 to a network, and an input / output (I / O) interface 358. The device 300 may operate based on an operating system stored in the memory 332, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.
[0172] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0173] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0174] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0175] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0176] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.
Claims
1. A project creation method, characterized in that: include: In response to determining that a target project needs to be created in the first integrated development environment, obtaining project information of the target project, where the target project is a project that supports creation in the second integrated development environment; Determining a target project template matching the project information based on a pre-created plug-in, wherein the plug-in has a built-in project template; Based on the target project template, the target project is created in the first integrated environment.
2. The method according to claim 1, characterized in that The step of creating the target project in the first integrated environment based on the target project template includes: Calling a template file replacement engine to replace the replacement file in the target project template; Based on the file system object created in the plug-in, obtain the non-replacement files in the data package corresponding to the target project template; The replacement file and the non-replacement file are copied to a target path of the first integrated environment to create the target project.
3. The method according to claim 1 or 2, characterized in that: The determining to create a target project in the first integrated development environment includes: In response to detecting a command to create a project on the user operation interface, a pop-up window displays a first interface, the first interface is used to guide the user to input project information, and is provided with a first button, the first button is used to trigger the creation of the target project; If it is detected that the input of accurate project information of the target project is completed in the first interface, setting the first button on the first interface to an operable state; In response to detecting an operation on the first button, it is determined that a target project needs to be created in a first integrated development environment.
4. The method according to claim 3, characterized in that The obtaining of the project information of the target project includes at least one of the following: Get the project name entered by the user in the project name input interface of the first interface; Get the package name entered by the user in the package name input interface of the first interface; Get the path entered by the user in the path setting interface of the first interface; Get the project type selected by the user in the project type selection interface of the first interface; Get the target project template type selected by the user in the project template type selection interface of the first interface.
5. The method according to claim 4, characterized in that The method further comprises: In response to detecting that a modified package name is input into the package name input interface of the first interface and detecting that a project name is input into the project name input interface of the first interface, keeping the modified package name unchanged; or In response to detecting that a modified project name is input at the project name input interface of the first interface, the package name of the package name input interface is controlled to change following the modified project name.
6. The method according to claim 1 or 2, characterized in that: The method further comprises: If the creation of the target project requires the execution of a script file, a thread for running the script file is created, and the script file is executed based on the thread.
7. The method according to claim 6, characterized in that The method further comprises: During the execution of the script file, the animation is displayed on the current display interface, and after the script file finishes running, the animation stops being displayed.
8. The method according to any one of claims 1 to 7, characterized in that: The first integrated development environment includes: IDEA development environment.
9. The method according to any one of claims 1 to 7, characterized in that: The target projects include: Quick application project.
10. A project creation device, characterized in that: include: An acquiring unit, configured to acquire project information of a target project in response to determining that a target project needs to be created in the first integrated development environment, wherein the target project is a project that supports creation in the second integrated development environment; A determination unit, configured to determine a target project template matching the project information based on a pre-created plug-in, wherein the plug-in has a built-in project template; A creating unit is used to create the target project in the first integrated environment based on the target project template.
11. The device according to claim 10, characterized in that The creation unit creates the target project in the first integrated environment based on the target project template in the following manner: Calling a template file replacement engine to replace the replacement file in the target project template; Based on the file system object created in the plug-in, obtain the non-replacement files in the data package corresponding to the target project template; The replacement file and the non-replacement file are copied to a target path of the first integrated environment to create the target project.
12. The device according to claim 10 or 11, characterized in that The acquisition unit determines to create a target project in the first integrated development environment in the following manner: In response to detecting a command to create a project on the user operation interface, a pop-up window displays a first interface, the first interface is used to guide the user to input project information, and is provided with a first button, the first button is used to trigger the creation of the target project; If it is detected that the input of accurate project information of the target project is completed in the first interface, setting the first button on the first interface to an operable state; In response to detecting an operation on the first button, it is determined that a target project needs to be created in a first integrated development environment.
13. The device according to claim 12, characterized in that The acquisition unit acquires the project information of the target project in the following manner, including at least one of the following: Get the project name entered by the user in the project name input interface of the first interface; Get the package name entered by the user in the package name input interface of the first interface; Get the path entered by the user in the path setting interface of the first interface; Get the project type selected by the user in the project type selection interface of the first interface; Get the target project template type selected by the user in the project template type selection interface of the first interface.
14. The device according to claim 13, characterized in that The acquisition unit is also used for: In response to detecting that a modified package name is inputted in the package name input interface of the first interface and detecting that a project name is inputted in the project name input interface of the first interface, keeping the modified package name unchanged; or In response to detecting that a modified project name is input at the project name input interface of the first interface, the package name of the package name input interface is controlled to change following the modified project name.
15. The device according to claim 10 or 11, characterized in that The creation unit is also used for: If the creation of the target project requires the execution of a script file, a thread for running the script file is created, and the script file is executed based on the thread.
16. The device according to claim 15, characterized in that The creation unit is also used for: During the execution of the script file, the animation is displayed on the current display interface, and after the script file finishes running, the animation stops being displayed.
17. The device according to any one of claims 10 to 16, characterized in that: The first integrated development environment includes: IDEA development environment.
18. The device according to any one of claims 10 to 16, characterized in that: The target projects include: Quick application project.
19. A project creation device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the project creation method described in any one of claims 1-9.
20. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by the processor of the terminal, the terminal is enabled to execute the project creation method described in any one of claims 1-9.
Citation Information
Patent Citations
Project engineering construction method and device based on IDEA plug-in
CN113805877A
Application development method and device based on industrial internet platform and terminal equipment
CN113885849A
Project generation method and device
CN114461195A
Application program construction method and device and electronic equipment
CN115390825A
Automated execution reporting for container builds
US11200157B1