Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and plug-in tool for rapidly making spec file based on VSCode integrated development environment

An integrated development environment and file technology, applied in the field of plug-in tools, can solve problems such as low editing efficiency, no support for RPM predefined macro associative input, and predefined macros cannot be expanded to view the definition content.

Active Publication Date: 2022-02-25
KYLIN CORP
View PDF2 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The embodiment of the present application provides a method and a plug-in tool for quickly making a spec file based on the VSCode integrated development environment to solve the existing VSCode integrated development environment, editing the spec file does not support RPM predefined macro association input, and Predefined macros cannot be expanded to view their definitions. You need to use the rpmspec-E command on the linux command line to view them. When you need to use predefined macros, you need to use the rpm --showrc command on the linux command line or view them in the predefined macro file. , it is necessary to frequently switch between the command line and the editor, and the technical problem of low editing efficiency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and plug-in tool for rapidly making spec file based on VSCode integrated development environment
  • Method and plug-in tool for rapidly making spec file based on VSCode integrated development environment
  • Method and plug-in tool for rapidly making spec file based on VSCode integrated development environment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0056] For ease of understanding, see figure 1 with figure 2 , an embodiment of a method for quickly making a spec file based on the VSCode integrated development environment provided by the application includes the following steps:

[0057] Develop plug-ins in the VSCode integrated development environment;

[0058] When the spec file is entered into the text editor, the plugin activates and runs;

[0059]The plug-in receives the input content of the text editor and calls the RPM command, and the RPM command implements macro association input and macro definition expansion according to the input content.

[0060] It should be noted that, if image 3 As shown, a plug-in is developed in the VSCode integrated development environment. When the developer edits the spec file in the VSCode integrated development environment, the plug-in will automatically provide the association input of the macro. When the mouse hovers or selects the RPM predefined macro, it will automatically ...

Embodiment 2

[0062] For ease of understanding, see Figure 4 , as a further improvement of Embodiment 1, the plug-in receives the input content of the text editor and invokes the RPM command, and the RPM command implements macro association input according to the input content, including the following steps:

[0063] receive input;

[0064] Initialize an array to save the list of defined macros;

[0065] Call the rpm--showrc command through the exec system function;

[0066] Monitor the standard output of the rpm--showrc command, and parse out the macros defined in the system line by line, and add the macros to the macro list array;

[0067] Initialize a new array to save the matching results;

[0068] Loop the macro list array and perform regular matching with the input content one by one, and add the matched macros to the result array;

[0069] Send the matching results to a text editor and display the output.

[0070] It should be noted that, if Figure 4 As shown, 1. The user ope...

Embodiment 3

[0072] For ease of understanding, see Figure 5 , as a further improvement of Embodiment 1, the plug-in receives the input content of the text editor and calls the RPM command, and the RPM command implements macro definition expansion according to the input content, including the following steps:

[0073] Select the imported macro definition;

[0074] Receive the currently selected input content;

[0075] Call the rpm-E command through the exec system function;

[0076] Listen to the standard output of the rpm-E command and read the content of the standard output;

[0077] If the output content is not empty, it means that the macro has been defined, and the output result will be sent to the text editor for output display.

[0078] It should be noted that, if Figure 5 As shown, 1. The user opens the spec file in the VSCode integrated development environment, 2. Enters the text editor in the VSCode integrated development environment, 3. Activates and runs the plug-in, 4. Se...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method and a plug-in tool for rapidly a making spec file based on a VSCode integrated development environment. The method comprises the following steps: developing a plug-in in a VSCode integrated development environment; when a spec file enters a text editor, activating and running the plug-in; receiving input content of the text editor and calling an RPM command by the plug-in, wherein the RPM command achieves macro association input and macro definition expansion according to the input content. When the spec file is edited, a predefined macro of the rpm can be quickly associated and input, and when a mouse is suspended or the predefined macro is selected, the content can be automatically expanded, so that developers can conveniently and quickly edit spec files so as to improve development efficiency, and RPM macro association input and macro definition expansion are provided in a VSCode integrated development environment in a plug-in mode.

Description

technical field [0001] This application relates to the technical field of making spec files, in particular to a method and a plug-in tool for quickly making spec files based on the VSCode integrated development environment. Background technique [0002] The software in the current RedHat-based Linux system is usually released as an RPM package. When building an RPM package, developers need to edit the spec file to configure basic package information, build scripts, and package dependencies. [0003] The RPM package manager defines some predefined macros, and each linux distribution will also provide some custom RPM macros, which can be used directly by developers when editing spec files, but if developers want to query the defined ones in the current system The macro list can only be viewed by viewing the macro file under / usr / lib / rpm / or executing the rpm --showrc command on the command line; when editing the spec file, the operation is cumbersome, and you need to switch ba...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/33
CPCG06F8/33
Inventor 薛炜吴春光齐璇顾郁莲战茅
Owner KYLIN CORP
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products