CN114064014A - Self-service code source file automatic generation method based on Microsoft visual studio development tool - Google Patents

Self-service code source file automatic generation method based on Microsoft visual studio development tool Download PDF

Info

Publication number
CN114064014A
CN114064014A CN202111294741.1A CN202111294741A CN114064014A CN 114064014 A CN114064014 A CN 114064014A CN 202111294741 A CN202111294741 A CN 202111294741A CN 114064014 A CN114064014 A CN 114064014A
Authority
CN
China
Prior art keywords
code
source file
generated
self
development tool
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111294741.1A
Other languages
Chinese (zh)
Inventor
曾小文
沈孝余
王承松
刘舒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Clp Xiangjiang Data Service Co ltd
Original Assignee
Clp Xiangjiang Data Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Clp Xiangjiang Data Service Co ltd filed Critical Clp Xiangjiang Data Service Co ltd
Priority to CN202111294741.1A priority Critical patent/CN114064014A/en
Publication of CN114064014A publication Critical patent/CN114064014A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a self-service code source file automatic generation method based on a Microsoft visual studio development tool, which comprises the following steps: s1, installing the automatically generated plug-in; s2, clicking a folder in the solution resource manager, selecting a code source file generation option, and selecting a tool for popping up an automatic file generation; s3, filling the code content of the code source file to be generated in the code content input box of the tool; s4, modifying file names, namespaces, code annotations and the like according to the requirements of the user; s5, previewing the written source file, and clicking the generation button to generate the source file after no problem exists. The invention automatically generates the code source file plug-in through research and development, and binds the plug-in with the VS development tool together: enabling the plug-in to automatically generate a code file; whether a generated source file has a problem or not can be previewed online; and manual creation of a source file is not needed, so that the working efficiency is improved.

Description

Self-service code source file automatic generation method based on Microsoft visual studio development tool
Technical Field
The invention belongs to the technical field of automatic generation of code source files, and particularly relates to a self-service code source file automatic generation method based on a Microsoft visual studio development tool.
Background
A file refers to a collection of related elements defined by the creator having a file name. A source file generally refers to the result of code written in assembly or high level languages being saved as a file, the source file being relative to the target file and the executable file.
The code source file used in some hospitals is a set of basic versions generated through a self-help program, then the basic versions are sent to occasions needing to be used, and then the interfaces are docked according to HIS. But the HIS of each hospital docking is different, and the interfaces are different, so the code source files required by the docking interfaces need to be modified again, and even some code source files need to be deleted and manually created and added again.
A hospital has a minimum of seven to eight business functions, and can reach more than twenty functions, and the average number of interfaces contained in each business function is about five, which means that each function needs to write dozens of code source files, and the workload is huge and complicated. And as medical treatments evolve, the complexity of the interfaces is increasing. The current code source file writing is also increasingly troublesome, the problems of field omission, errors, field structure confusion and the like are easy to occur, and the work development efficiency is seriously influenced.
Therefore, in view of the above technical problems, there is a need to provide a self-help code source file automatic generation method based on microsoft visual studio development tool.
Disclosure of Invention
The invention aims to provide a self-service code source file automatic generation method based on a Microsoft visual studio development tool, so as to solve the problems of low source file code writing efficiency and insecurity.
In order to achieve the above object, an embodiment of the present invention provides the following technical solutions:
a self-help code source file automatic generation method based on a Microsoft visual studio development tool comprises the following steps:
s1, installing the automatically generated plug-in;
s2, clicking a folder in the solution resource manager, selecting a code source file generation option, and selecting a tool for popping up an automatic file generation;
s3, filling the code content of the code source file to be generated in the code content input box of the tool;
s4, modifying file names, namespaces, code annotations and the like according to the requirements of the user;
s5, previewing the written source file, and clicking the generation button to generate the source file after no problem exists.
Further, the plug-in the S1 includes an IDTE2 interface, and the IDTE2 interface is encapsulated outside the visual studio IDE, and is used to provide a uniform entry for the plug-in to interact with the visual studio2010+, and includes, but is not limited to, IDE operations such as generation of project files, search of project files, and output of consoles, and further implements an IDE plug-in auto-registration function based on XML configuration.
Further, the plugin in S1 further includes an operation interface where multiple versions coexist based on the WinForm technology, which is convenient for a user to operate, avoids a situation that the user cannot operate, and improves applicability of the plugin.
Further, the plug-in unit in S1 may generate corresponding code structures through IO streams from multiple sources, so as to complete generation of the code source file.
Furthermore, the plug-in unit in S1 includes executable installation files of multiple versions, which facilitates rapid generation of source code and improves writing efficiency of the source code, thereby improving working efficiency of the plug-in unit.
Further, the step of S5 includes:
s5.1, verifying whether the source file is compiled or not through the plug-in, or previewing the source file after the compiling is finished on line;
s5.2, confirming whether the code content has a problem or not;
s5.3, when the code inner barrel has a problem, the code inner barrel can be modified online, then a code source file is generated, and verification is carried out;
and S5.4, directly generating a code source file after the code content has no problem.
Further, the data source of the code is: clipboard, file and network, whether the code has the next code key value needs to be judged after the code is generated.
Further, the source file code includes JObject, jar and jvialue, and when the source file code is JObject, Class needs to be recursively generated, and then the code is generated again.
Further, when the source file code is jar and jvirtual, a list field and a value field need to be generated respectively.
Further, the source file code is JArray, Class needs to be generated recursively after the list field is generated, then codes continue to be generated, the source file code is JVALUE, and whether a next code key value exists or not needs to be judged again after the numerical value field is generated.
Compared with the prior art, the invention has the following advantages:
the invention automatically generates the code source file plug-in through research and development, and binds the plug-in with the VS development tool together:
firstly, a code file is automatically generated and whether the file passes compiling can be verified without finding a tool or opening a corresponding tool website during each use;
secondly, previewing whether the generated source file has a problem or not on line, and if so, generating a code source file after performing on-line modification;
and the problem that field personnel manually compile source files with large workload and repeatability is solved efficiently, and the safety and the accuracy of development are improved, so that the working efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a usage diagram of a method for automatically generating a self-help code source file based on Microsoft visual studio development tool in an embodiment of the present invention;
fig. 2 is a functional flowchart of a self-help code source file automatic generation method based on microsoft visual studio development tool in an embodiment of the present invention.
Detailed Description
The present invention will be described in detail below with reference to embodiments shown in the drawings. The embodiments are not intended to limit the present invention, and structural, methodological or functional changes made by those skilled in the art according to the embodiments are included in the scope of the present invention.
The invention discloses a self-service code source file automatic generation method based on a Microsoft visual studio development tool, which is shown in a reference figure 1-a figure 2 and comprises the following steps:
s1, installing the automatically generated plug-in;
the plug-in the S1 comprises an IDTE2 interface, the IDTE2 interface is packaged outside the visual studio IDE, is used for providing a uniform entrance for the interaction of the plug-in and the visual studio2010+, and comprises IDE operations such as but not limited to generation of project files, search of the project files and output of a console, and the automatic registration function of the IDE plug-in based on XML configuration is realized.
In addition, the plugin in S1 further includes an operation interface where multiple versions coexist based on the WinForm technology, which is convenient for a user to operate, avoids a situation that the user cannot operate, and improves the applicability of the plugin.
Specifically, the plug-in S1 may generate corresponding code structures through IO streams of various sources, so as to complete the generation of the code source file.
In addition, the plug-in S1 comprises multiple versions of executable installation files, so that the source code can be generated quickly, the writing efficiency of the source code is improved, and the working efficiency of the plug-in is improved.
S2, clicking a folder in the solution resource manager, selecting a code source file generation option, and selecting a tool for popping up an automatic file generation;
s3, filling the code content of the code source file to be generated in the code content input box of the tool;
s4, modifying file names, namespaces, code annotations and the like according to the requirements of the user;
s5, previewing the written source file, and clicking the generation button to generate the source file after no problem exists.
Wherein, S5 includes the following steps:
s5.1, verifying whether the source file is compiled or not through the plug-in, or previewing the source file after the compiling is finished on line;
s5.2, confirming whether the code content has a problem or not;
s5.3, when the code inner barrel has a problem, the code inner barrel can be modified online, then a code source file is generated, and verification is carried out;
and S5.4, directly generating a code source file after the code content has no problem.
Wherein, the data source of the code comprises: clipboard, file and network, need to judge whether there is next code key value after the code is generated.
In addition, the source file code includes JObject, jar and JValue, a Class needs to be recursively generated when the source file code is JObject, and then the code needs to be generated again, and a list field and a value field need to be generated when the source file code is jar and JValue, respectively.
Specifically, the source file code is JArray, Class needs to be recursively generated after a list field is generated, then codes continue to be generated, the source file code is JVALUE, and whether a next code key value exists or not needs to be judged again after a numerical field is generated.
When the system is used specifically, a VSIDE universal interface is used for providing a uniform inlet interacting with VS of each version, a GUI project constructed by a WinForm technology is independently provided for realizing multi-version compatibility, and various code source files with similarity are automatically generated through predefined code rules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present description refers to embodiments, not every embodiment may contain only a single embodiment, and such description is for clarity only, and those skilled in the art should integrate the description, and the embodiments may be combined as appropriate to form other embodiments understood by those skilled in the art.

Claims (10)

1. A self-help code source file automatic generation method based on a Microsoft visual studio development tool is characterized by comprising the following steps:
s1, installing the automatically generated plug-in;
s2, clicking a folder in the solution resource manager, selecting a code source file generation option, and selecting a tool for popping up an automatic file generation;
s3, filling the code content of the code source file to be generated in the code content input box of the tool;
s4, modifying file names, namespaces, code annotations and the like according to the requirements of the user;
s5, previewing the written source file, and clicking the generation button to generate the source file after no problem exists.
2. The automated self-help code source file generation method based on the microsoft visual studio development tool according to claim 1, wherein the plug-in S1 includes an IDTE2 interface, and the IDTE2 interface is encapsulated outside the visual studio ide.
3. The method for automatically generating a self-help code source file based on the microsoft visual studio development tool according to claim 1, wherein the plug-in S1 further comprises an operation interface for constructing multi-version coexistence based on WinForm technology.
4. The method for automatically generating the self-help code source file based on the microsoft visual studio development tool according to claim 1, wherein the plug-in S1 can generate corresponding code structures through IO streams from multiple sources so as to complete the generation of the code source file.
5. The method for automatically generating the self-help code source file based on the Microsoft Visualstudio development tool, according to claim 1, wherein the plug-in S1 comprises multiple versions of executable installation files.
6. The method for automatically generating self-help code source file based on Microsoft Visualstudio development tool according to claim 1, wherein the step of S5 is included in the following steps:
s5.1, verifying whether the source file is compiled or not through the plug-in, or previewing the source file after the compiling is finished on line;
s5.2, confirming whether the code content has a problem or not;
s5.3, when the code inner barrel has a problem, the code inner barrel can be modified online, then a code source file is generated, and verification is carried out;
and S5.4, directly generating a code source file after the code content has no problem.
7. The method for automatically generating the self-service code source file based on the microsoft visual studio development tool according to claim 1, wherein the data source of the code comprises: clipboard, file and network, whether the code has the next code key value needs to be judged after the code is generated.
8. The method for automatically generating the self-help code source file based on the Microsoft visual studio development tool is characterized in that the source file code comprises JObject, JArrary and JVALUE, when the source file code is JObject, Class needs to be generated recursively, and then the code is generated again.
9. The method for automatically generating the self-help code source file based on the microsoft visual studio development tool according to claim 7, wherein when the source file code is jar and jvirtual, a list field and a value field need to be generated respectively.
10. The method for automatically generating the self-service code source file based on the microsoft visual studio development tool according to claim 9, wherein the source file code is JArrary, Class needs to be recursively generated after a list field is generated, then codes continue to be generated, the source file code is jval, and whether a next code key value exists again after a numerical field is generated is judged.
CN202111294741.1A 2021-11-03 2021-11-03 Self-service code source file automatic generation method based on Microsoft visual studio development tool Pending CN114064014A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111294741.1A CN114064014A (en) 2021-11-03 2021-11-03 Self-service code source file automatic generation method based on Microsoft visual studio development tool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111294741.1A CN114064014A (en) 2021-11-03 2021-11-03 Self-service code source file automatic generation method based on Microsoft visual studio development tool

Publications (1)

Publication Number Publication Date
CN114064014A true CN114064014A (en) 2022-02-18

Family

ID=80273674

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111294741.1A Pending CN114064014A (en) 2021-11-03 2021-11-03 Self-service code source file automatic generation method based on Microsoft visual studio development tool

Country Status (1)

Country Link
CN (1) CN114064014A (en)

Similar Documents

Publication Publication Date Title
US20220253298A1 (en) Systems and methods for transformation of reporting schema
EP1489496B1 (en) System and method for creating, managing and using code segments
Kästner et al. Type checking annotation-based product lines
US7581206B2 (en) Systems and methods for creating and providing templates in a single file
US20240045850A1 (en) Systems and methods for database orientation transformation
US20040158820A1 (en) System for generating an application framework and components
Reiss The Field programming environment: A friendly integrated environment for learning and development
US20180173520A1 (en) Transactional distributed data analysis and transformation
US8327323B2 (en) Automatic copying by ancestor in object-oriented languages
Trias et al. Migrating traditional web applications to CMS-based web applications
Ermel et al. Visual modeling and analysis of EMF model transformations based on triple graph grammars
CN110889013A (en) Data association method, device, server and storage medium based on XML
Mészáros et al. Delivering comprehension features into source code editors through LSP
JP2010140407A (en) Source code inspection device
CN114064014A (en) Self-service code source file automatic generation method based on Microsoft visual studio development tool
Edmunds et al. Tool support for Event-B code generation
Drux et al. Embedding textual languages in MagicDraw
Bowen Creating models of interactive systems with the support of lightweight reverse-engineering tools
Lengyel et al. Quality assured model-driven requirements engineering and software development
Djeddai et al. Integrating a formal development for DSLs into meta-modeling
Radošević et al. Error messaging in generative programming
CN108829387B (en) RPC function generation method based on Windows platform
Hunold et al. Pattern-based refactoring of legacy software systems
Chen et al. A model driven XML transformation framework for business performance management model creation
CN117170654A (en) Development method and device of graphical user interface application program and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination