CN102339218A - Program code annotating management method and device - Google Patents
Program code annotating management method and device Download PDFInfo
- Publication number
- CN102339218A CN102339218A CN2010102331871A CN201010233187A CN102339218A CN 102339218 A CN102339218 A CN 102339218A CN 2010102331871 A CN2010102331871 A CN 2010102331871A CN 201010233187 A CN201010233187 A CN 201010233187A CN 102339218 A CN102339218 A CN 102339218A
- Authority
- CN
- China
- Prior art keywords
- note
- program code
- code
- association index
- input
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a program code annotating management method and device. The program code annotating management method comprises the following steps of: analyzing a program code and obtaining a relevant index between an annotation and the program code or obtaining the relevant index between the annotation and the program code from an annotation library; and carrying out synchronous processing on an independent annotation and the program code according to the relevant index. The program code annotating management device comprises a code input and output module, an annotation input and output module, a code annotation relevant module, a code storage module and an annotation storage module. The program code annotating management method and device of the invention solve the problem of independent management of the program code annotation and improve the efficiency of program development.
Description
Technical field
The present invention relates to computer software fields, relate in particular to management method and device at the program code note of field of software development.
Background technology
Along with the development of various application of the mankind and hardware chip technology, various application software become increasingly complex with huge, and the file that the hardware handles unit that application software is generally transformed through compiler by program code can be discerned is formed.Complicated software need be developed the program code of number of complex; Therefore the program code problem of management has become and has become increasingly conspicuous; Especially the program code form in many people development teams is difficult to unification, lowers readable program code and maintainable problem, the code View difficult coordination.
Program code generally is a text formatting, and program code has comprised note for readability and the maintainability that increases code usually, and note is normally to the explanation and the explanation of program code.Note and program code are as a global storage and processing.Note is readable program code and maintainable key factor; Note disunity, too much note have all influenced the readable and maintainable of program; But present various note all is embedded in the program's code file, and especially along with program code is constantly huge, being coupling in fully of program code and code annotation had a strong impact on the readable and maintainable of program code in the integral body; Reduce software program code development efficiency, improved software cost.
Code View is a significant process in the program code exploitation; Code View is exactly that the developer inspects the code of the other side exploitation mutually and provides and revises prompting note or annotations and comments, but the current procedure code is unformatted text, inspects annotations and comments and can not be embedded in the program code and go; So just need manual will inspecting to annotate and comment on the program code that corresponds to appointment; So remarkable reduction program development team unity efficient is especially revised and change along with program code, and manual correspondence is difficult to handle more.
In order to solve some above-mentioned defectives, improve the efficient of program development, and reduce software cost, the present invention provides a kind of method, is used for the supervisory routine code annotation, realizes the separate, stored and the synchronous processing of program code and note.
Summary of the invention
In view of above-mentioned existing in prior technology problem; The purpose of the embodiment of the invention is; A kind of management method of program code note and device are used for solving note and are embedded in the unmanageable problem of program code, thereby realize note and the separate, stored of program code and the mechanism of synchronous processing; Improve the development efficiency of program code, reduce the cost of software.
Above-mentioned purpose is to realize through following technical scheme:
The embodiment of the invention provides a kind of management method of program code note, comprising:
Obtain the association index of note and program code;
According to said association index note is independently carried out synchronous processing.
The above-mentioned association index that obtains note and program code comprises: analyze the association index that described program code obtains note and program code.
The above-mentioned association index that obtains note and program code also comprises: the association index that from the note storehouse, obtains note and program code.
Above-mentioned association index comprises one or more combinations in following: the symbol of the library name of explicit association index, program code, the row of program code number, program code.
Above-mentioned according to said association index note independently carried out synchronous processing and comprises:
Obtain corresponding note according to described association index;
According to the correspondence position output note of described association index at program code.
Or
Obtain corresponding note according to described association index;
Delete described note.
Or
Import the corresponding note of described association index;
Store described association index and described note.
Or
Obtain corresponding note according to described association index;
Described note is inserted on the position of the corresponding program code of described association index.
The embodiment of the invention provides a kind of management devices of program code note again, comprising:
The code input/output module, the input and output that are used for program code are handled;
The note input/output module, the input and output that are used for note are handled;
The code annotation relating module is used for the mapping treatment of program code and note, and said mapping treatment comprises: the code annotation relating module shines upon according to association index, and information code input/output module or note input/output module are handled simultaneously.
The management devices of above-mentioned a kind of program code note can also comprise:
The code storage module is used for program code stored;
The annotation storage module is used to store note and association index.
Technical scheme by the invention described above embodiment provides can be found out; The embodiment of the invention provides a kind of method and device of program code note management; Solve note and be embedded in some defectives in the program code, improved the efficient of program development, and reduced software cost.
Description of drawings
Fig. 1 is the applied environment figure of program code management of the present invention;
Fig. 2 is the installation drawing of program code management of the present invention;
Fig. 3 is the synchronous output note synoptic diagram in the code annotation management of the present invention;
Fig. 4 increases the note synoptic diagram to program code in the code annotation of the present invention management;
Fig. 5 is that independently note of the present invention merges to the synoptic diagram in the program code;
The synoptic diagram that Fig. 6 separates for the note that program code is comprised of the present invention.
Embodiment
Below in conjunction with accompanying drawing embodiment of the present invention is elaborated.
At first; Introduce the program code note management method be applied environment of the present invention; See also accompanying drawing 1; The management method of program code note realizes that in the code annotation supervisory routine code annotation supervisory routine is to realize the instruction set of code annotation management, and the code annotation supervisory routine is loaded in 102 storage unit; Run time version note supervisory routine is responsible in 101 software processes unit; Promptly 101 software processes unit obtain said instruction from 102 storage unit and carry out described instruction then, and 101 software processes unit can receive input according to the instruction of described code annotation supervisory routine from 104 input blocks, and 101 software processes unit further output to 103 output units according to the instruction of described code annotation supervisory routine with execution result; Further, 101 software processes unit also will store into 102 storage unit from the input that 104 input blocks receive.Wherein, The concrete realization in 101 software processes unit comprises CPU (Central Processing Unit; CPU) etc.; The concrete realization of 102 storage unit comprises internal memory etc., and the concrete realization of 103 output units comprises display, display terminal etc., and 104 input blocks specifically realize comprising keyboard, mouse, writing pencil etc.101 software processes unit, 102 storage unit, 103 output units and 104 input blocks are coordinated, and have constituted the basic running environment of code annotation supervisory routine.
The code annotation supervisory routine be responsible for synchronously the output note, synchronously delete note, synchronously import note, merge note and separated in synchronization note synchronously.Program code and note are separate, stored; Be that note is not embedded in the program code; Program code shines upon through association index with note or is related; Association index comprises one or more combinations in the symbol of row number, program code of library name, the program code of explicit association index, program code, and wherein the library name of program code specifically comprises program's code file name, program code data library name etc.
The output note is responsible for correspondence position output or the demonstration note at program code synchronously; Mainly comprise: the routine analyzer code obtains association index or from the note storehouse, obtains association index; From the note storehouse, obtain the corresponding note of association index then, then according to correspondence position output or the demonstration note of association index at program code.
The deletion note is responsible for from the note storehouse, deleting note synchronously, and mainly comprise: the routine analyzer code obtains to be waited to delete the association index of note or from the note storehouse, obtain the association index of waiting to delete note, from the note storehouse, obtains corresponding note according to association index; Described note of deletion and association index from the note storehouse if there is explicit association index in the program code, are then deleted explicit association index synchronously in program code then.
Synchronously the input note mainly comprises: the routine analyzer code obtains the association index of the program code of waiting to increase note, input or the corresponding note of editor's association index; Store described association index and described note.
Merging note mainly comprises: from the note storehouse, obtain the association index of note to be combined, from the note storehouse, obtain corresponding note according to described association index; Described note is inserted on the position of the corresponding program code of described association index.
Separating note mainly comprises: the routine analyzer code obtains note and the corresponding association index of note in the program code; Store described association index and described note; Note in the delete program code is if explicit index then increases explicit index in program code.
Through above-mentioned code annotation supervisory routine; Program code and annotation storage are in different storehouses; The code annotation supervisory routine is responsible for the related or corresponding of program code and note, is about to designated program code and the note of appointment and gets up into as a wholely in correspondence with each other, and the while can be separated separate, stored with the note in the program code easily; Also can note independently be merged in the program code and go; Thereby the program code of realizing separate, stored and note can synchronous processing, realize program code and note flexible management, improve the efficient that program code is developed greatly.
Need to prove that the concrete realization of above-mentioned applied environment can be varied, includes but not limited to personal computer, server, handheld terminal, notebook computer.
The present invention has also described the device of program code management; See also accompanying drawing 3, the device of program code management comprises: 201 code input/output modules, 202 note input/output modules, 203 code annotation relating modules, 204 code storage modules and 205 annotation storage modules.201 code input/output modules are responsible for the input and output of program code and are handled, and are referred to as the code editor usually, specifically comprise: receive the input of program code from input block, and store the program code of input into 204 code storage modules.The concrete realization of 201 code input/output modules includes but not limited to editor or text box or edit box.202 note input/output modules are responsible for the input and output of note and are handled, and specifically comprise: receive the input of note from input block, and with the annotation storage of input to 205 annotation storage modules.The concrete realization of 202 note input/output modules includes but not limited to editor or text box or edit box.203 code annotation relating modules are responsible for the mapping of program code and note, and 203 code annotation relating modules shine upon according to association index, notify 201 code input/output modules or 202 note input/output modules to handle simultaneously.Explicit association index refers to that explicitly increases an association index mark in program code, and for example explicitly increases a mark in C prophesy code, as :/* note #00026*/.203 code annotation relating modules correspond to the note of appointment according to association index with program code or note are corresponded to the program code of appointment.General; If there are note in one section program code or delegation's program code or a program code symbol; 203 code annotation relating modules obtain association index and association index are passed to 202 note input/output modules from described one section program code or delegation's program code or a program code symbol, and 202 note input/output modules input or output its corresponding note according to association index.204 code storage modules are responsible for program code stored, and for example: 204 code storage modules realize the program code read-write, and code storage module program code read from memory function bodies such as disk, database perhaps writes program code the memory function body.205 annotation storage modules are responsible for note and association index as the note library storage, and the note library storage is on memory function bodies such as disk, database.204 code storage modules and 205 annotation storage modules have realized the separate, stored of program code and note, and 201 code input/output modules and 202 note input/output modules are carried out synchronous processing through 203 code annotation relating modules to program code and note.Can realize conveniently that like this program code and note are independent of each other, the automatic correspondence and the management by synchronization that also can realize inspecting annotations and comments have easily simultaneously improved the maintainable and readable of program code, reduce the cost of development of program code.
Be program code management process and associative operation below, the detailed description of device embodiment above combining simultaneously.
Accompanying drawing 3 has been described the step of the synchronous output note in the code annotation management, specifically comprises:
Through accompanying drawing 3 described methods, can export or show the note of appointment during the program code exploitation as required, can make program code cleaner and tidier, note is more pointed simultaneously, has improved the readable and maintainable of program code.
Accompanying drawing 4 has been described the step to program code increase note in the code annotation management, specifically comprises:
The independently note that accompanying drawing 5 has been described in the code annotation management merges to the step in the program code, specifically comprises:
Accompanying drawing 6 has been described the step that the note that program code is comprised in the code annotation management is separated, and specifically comprises:
The above; Be merely the preferable embodiment of the embodiment of the invention; But the protection domain of the embodiment of the invention is not limited thereto; Any technician who is familiar with the present technique field is in the technical scope that the embodiment of the invention discloses, and the variation that can expect easily or replacement all should be encompassed within the protection domain of the embodiment of the invention.Therefore, the protection domain of the embodiment of the invention should be as the criterion with the protection domain of claim.
Claims (9)
1. the management method of a program code note is characterized in that, comprising:
Obtain the association index of note and program code;
According to said association index note is independently carried out synchronous processing.
2. method according to claim 1 is characterized in that, the described association index that obtains note and program code comprises:
Analyze the association index that described program code obtains the association index of note and program code or from the note storehouse, obtains note and program code.
3. method according to claim 1 and 2 is characterized in that, described association index comprises one or more combinations in following:
The symbol of the library name of explicit association index, program code, the row of program code number, program code.
4. method according to claim 1 is characterized in that, describedly according to said association index note is independently carried out synchronous processing and comprises:
Obtain corresponding note according to described association index;
According to the correspondence position output note of described association index at program code.
5. method according to claim 1 is characterized in that, describedly according to said association index note is independently carried out synchronous processing and comprises:
Obtain corresponding note according to described association index;
Delete described note.
6. method according to claim 1 is characterized in that, describedly according to said association index note is independently carried out synchronous processing and comprises:
Import the corresponding note of described association index;
Store described association index and described note.
7. method according to claim 1 is characterized in that, describedly according to said association index note is independently carried out synchronous processing and comprises:
Obtain corresponding note according to described association index;
Described note is inserted on the position of the corresponding program code of described association index.
8. the management devices of a program code note is characterized in that, comprising:
The code input/output module, the input and output that are used for program code are handled;
The note input/output module, the input and output that are used for note are handled;
The code annotation relating module is used for the mapping treatment of program code and note, and said mapping treatment comprises: the code annotation relating module shines upon according to association index, and information code input/output module or note input/output module are handled simultaneously.
9. device according to claim 8 is characterized in that, the device of described a kind of program code note management further comprises:
The code storage module is used for program code stored;
The annotation storage module is used to store note and association index.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102331871A CN102339218A (en) | 2010-07-21 | 2010-07-21 | Program code annotating management method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102331871A CN102339218A (en) | 2010-07-21 | 2010-07-21 | Program code annotating management method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102339218A true CN102339218A (en) | 2012-02-01 |
Family
ID=45514965
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010102331871A Pending CN102339218A (en) | 2010-07-21 | 2010-07-21 | Program code annotating management method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102339218A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103324513A (en) * | 2013-06-04 | 2013-09-25 | 北京大学 | Program annotation method and device |
CN103927179A (en) * | 2014-04-18 | 2014-07-16 | 扬州大学 | Program readability analysis method based on WordNet |
CN104699467A (en) * | 2013-12-04 | 2015-06-10 | 北京新媒传信科技有限公司 | Source code processing method and device |
WO2015096267A1 (en) * | 2013-12-25 | 2015-07-02 | 盛杰 | Method and apparatus for code conversion |
CN106021410A (en) * | 2016-05-12 | 2016-10-12 | 中国科学院软件研究所 | Source code annotation quality evaluation method based on machine learning |
CN108170468A (en) * | 2017-12-28 | 2018-06-15 | 中山大学 | The method and its system of a kind of automatic detection annotation and code consistency |
CN109918114A (en) * | 2019-02-03 | 2019-06-21 | 广州视源电子科技股份有限公司 | Comment information acquisition methods, device, computer equipment and the storage medium of code |
CN110210009A (en) * | 2018-02-28 | 2019-09-06 | 中兴通讯股份有限公司 | Annotation process method, device and equipment, computer readable storage medium |
US10656938B2 (en) | 2018-09-25 | 2020-05-19 | International Business Machines Corporation | External comment storage and organization |
CN112559035A (en) * | 2021-01-22 | 2021-03-26 | 支付宝(杭州)信息技术有限公司 | Method and apparatus for managing notes of code text |
CN112698821A (en) * | 2021-01-12 | 2021-04-23 | 北京字节跳动网络技术有限公司 | Code labeling method, device, computer equipment, medium and system |
US11928156B2 (en) | 2020-11-03 | 2024-03-12 | International Business Machines Corporation | Learning-based automated machine learning code annotation with graph neural network |
-
2010
- 2010-07-21 CN CN2010102331871A patent/CN102339218A/en active Pending
Cited By (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103324513A (en) * | 2013-06-04 | 2013-09-25 | 北京大学 | Program annotation method and device |
CN103324513B (en) * | 2013-06-04 | 2016-08-10 | 北京大学 | Program annotation method and apparatus |
CN104699467A (en) * | 2013-12-04 | 2015-06-10 | 北京新媒传信科技有限公司 | Source code processing method and device |
WO2015096267A1 (en) * | 2013-12-25 | 2015-07-02 | 盛杰 | Method and apparatus for code conversion |
US9971577B2 (en) | 2013-12-25 | 2018-05-15 | Jie Sheng | Method and apparatus for code conversion |
CN103927179A (en) * | 2014-04-18 | 2014-07-16 | 扬州大学 | Program readability analysis method based on WordNet |
CN103927179B (en) * | 2014-04-18 | 2017-02-15 | 扬州大学 | Program readability analysis method based on WordNet |
CN106021410A (en) * | 2016-05-12 | 2016-10-12 | 中国科学院软件研究所 | Source code annotation quality evaluation method based on machine learning |
CN108170468A (en) * | 2017-12-28 | 2018-06-15 | 中山大学 | The method and its system of a kind of automatic detection annotation and code consistency |
CN108170468B (en) * | 2017-12-28 | 2021-04-20 | 中山大学 | Method and system for automatically detecting annotation and code consistency |
CN110210009A (en) * | 2018-02-28 | 2019-09-06 | 中兴通讯股份有限公司 | Annotation process method, device and equipment, computer readable storage medium |
US10656938B2 (en) | 2018-09-25 | 2020-05-19 | International Business Machines Corporation | External comment storage and organization |
CN109918114A (en) * | 2019-02-03 | 2019-06-21 | 广州视源电子科技股份有限公司 | Comment information acquisition methods, device, computer equipment and the storage medium of code |
US11928156B2 (en) | 2020-11-03 | 2024-03-12 | International Business Machines Corporation | Learning-based automated machine learning code annotation with graph neural network |
CN112698821A (en) * | 2021-01-12 | 2021-04-23 | 北京字节跳动网络技术有限公司 | Code labeling method, device, computer equipment, medium and system |
CN112698821B (en) * | 2021-01-12 | 2024-03-26 | 北京字节跳动网络技术有限公司 | Code labeling method, device, computer equipment, medium and system |
CN112559035A (en) * | 2021-01-22 | 2021-03-26 | 支付宝(杭州)信息技术有限公司 | Method and apparatus for managing notes of code text |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102339218A (en) | Program code annotating management method and device | |
McPhillips et al. | YesWorkflow: a user-oriented, language-independent tool for recovering workflow information from scripts | |
CN102087597B (en) | J2EE and component set-based visualized development platform | |
US7853924B2 (en) | Systems and methods for processing non-functional commentary of computer source code | |
CN111602114A (en) | System and method for providing an instant messaging channel within an integrated development environment | |
US10120654B2 (en) | Domain specific language design | |
CN108139891B (en) | Method and system for generating suggestions to correct undefined token errors | |
US9182947B2 (en) | Program source code navigation | |
US20140075364A1 (en) | Capturing Activity History Stream | |
US9201761B1 (en) | Debugging data format conversion | |
CN107273109B (en) | Method and system for modeling source code and method for using data model | |
CN103309647A (en) | Application program multi-language support system and method | |
CN102200911A (en) | Variable closure | |
CN109101519B (en) | Information acquisition system and heterogeneous information fusion system | |
US8898649B2 (en) | Application program analysis method, analysis system and recording medium for identifying a contributing factor for an invalid operation of an application program | |
CN101551793A (en) | Method for saving and editing files | |
US20070208767A1 (en) | Legacy Software Multimedia Capture and Analysis | |
US20150120682A1 (en) | Automated recognition of patterns in a log file having unknown grammar | |
CN110007922B (en) | Artificial intelligence-based graphical source code compiling method, device and equipment | |
CN107015955B (en) | Document editing method and device | |
Ratanotayanon et al. | Cross-artifact traceability using lightweight links | |
Shershakov | Vtmine for visio: A graphical tool for modeling in process mining | |
CN112596737A (en) | Method, system, equipment and storage medium for scanning function call relation | |
CN100562008C (en) | Message handling system and processing method thereof | |
Marinescu et al. | A meta-model for enterprise applications |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
DD01 | Delivery of document by public notice |
Addressee: Yang Zhenting Document name: Notification of Passing Preliminary Examination of the Application for Invention |
|
C06 | Publication | ||
PB01 | Publication | ||
DD01 | Delivery of document by public notice |
Addressee: Yang Zhenting Document name: Notification of Publication of the Application for Invention |
|
DD01 | Delivery of document by public notice |
Addressee: Yang Zhenting Document name: Notification that Application Deemed to be Withdrawn |
|
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120201 |