CN105930332B - Code releasing inquiry method and terminal - Google Patents
Code releasing inquiry method and terminal Download PDFInfo
- Publication number
- CN105930332B CN105930332B CN201610023764.1A CN201610023764A CN105930332B CN 105930332 B CN105930332 B CN 105930332B CN 201610023764 A CN201610023764 A CN 201610023764A CN 105930332 B CN105930332 B CN 105930332B
- Authority
- CN
- China
- Prior art keywords
- code
- symbol
- code segment
- cursor
- data
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Input From Keyboards Or The Like (AREA)
Abstract
The present invention provides a kind of code releasing inquiry method, which includes: the code publication instruction for identifying user and issuing;In the code publication instruction for receiving user's sending, and when cursor is currently at programmable region, identify that cursor is presently in the code segment issued in region by preset recognition rule;Extract the code data and corresponding preset kind data in the code segment of identification;And the code data extracted and corresponding preset kind data are stored in predetermined database.The present invention also provides a kind of terminals suitable for above-mentioned code releasing inquiry method.The present invention can simplify the manual operation in code publication and query process, save the activity duration, and not easy to make mistakes.
Description
Technical field
The present invention relates to Code Edit technical field, especially a kind of code releasing inquiry method and terminal.
Background technique
Eclipse is an open source code, the expansible platform based on Java, for being opened by plug in component building
Hair ring border.Eclipse includes developing plug environment (Plug-in Development Environment, PDE), this component
Mainly for the software developer for wishing extension Eclipse, them is allowed to construct the work with Eclipse environment Seamless integration-
Tool.Since sample thing every in Eclipse is all plug-in unit, for giving Eclipse to provide plug-in unit, and consistent and system is provided the user with
For one Integrated Development Environment, all too development personnel have same performance place.
However, in the prior art, although there are the scheme of release code in Eclipse and symbol lookup, this kind of side
Case, which usually requires cumbersome manual operation process, to be realized, the activity duration is wasted, and is often easy error.
Summary of the invention
In view of the foregoing, it is necessary to a kind of code releasing inquiry method be provided, can simplify code publication and inquiry
Manual operation in the process saves the activity duration, and not easy to make mistakes.
The code releasing inquiry method includes:
Identify that the code that user issues issues instruction;
In the code publication instruction for receiving user's sending, and when cursor is currently at programmable region, by preset
Recognition rule identifies that cursor is presently in the code segment issued in region;
Extract the code data and corresponding preset kind data in the code segment of identification;And
The code data extracted and corresponding preset kind data are stored in predetermined database.
Preferably, wherein the preset recognition rule be predefine mark can release code code segment starting the
One symbol, and can release code the second symbol for terminating of code segment, will be before present cursor position and closest to current light
The POS INT of the first symbol of target, until the position of the second symbol after present cursor position and closest to current cursor terminates
Code segment as can release code code segment.
Preferably, wherein the preset recognition rule be predefine mark can release code code segment starting the
One symbol, and can release code the second symbol for terminating of code segment, will be before present cursor position and closest to current light
Line code originates before the first symbol of target, until after present cursor position and closest to the second symbol of current cursor
The code segment that position terminates as can release code code segment.
Preferably, wherein the preset kind data include signature, annotation and author.
Preferably, the code releasing inquiry method further includes symbol lookup step comprising:
When user carries out software development using predetermined developing instrument using terminal, in the pass for receiving user's input
When key word or keyword, from the predetermined database, search out including with receive keyword or keyword phase
The code segment of matched code data and corresponding preset kind data;And by the code data of the code segment searched out and right
The preset kind data answered are shown in the terminal of the user.
In view of above content, there is a need to provide a kind of server suitable for above-mentioned code releasing inquiry method, it can
With the manual operation in simplified code publication and query process, the activity duration is saved, and not easy to make mistakes.
The terminal is suitable for above-mentioned code releasing inquiry method, wherein the terminal includes storage equipment and processing
Device, in which:
The storage equipment, for storing a code releasing inquiry system;
The processor, for calling and executing the code releasing inquiry system, to execute following steps:
Identify that the code that user issues issues instruction;
In the code publication instruction for receiving user's sending, and when cursor is currently at programmable region, by preset
Recognition rule identifies that cursor is presently in the code segment issued in region;
Extract the code data and corresponding preset kind data in the code segment of identification;And
The code data extracted and corresponding preset kind data are stored in predetermined database.
Preferably, wherein the preset recognition rule be predefine mark can release code code segment starting the
One symbol, and can release code the second symbol for terminating of code segment, will be before present cursor position and closest to current light
The POS INT of the first symbol of target, until the position of the second symbol after present cursor position and closest to current cursor terminates
Code segment as can release code code segment.
Preferably, wherein the preset recognition rule be predefine mark can release code code segment starting the
One symbol, and can release code the second symbol for terminating of code segment, will be before present cursor position and closest to current light
Line code originates before the first symbol of target, until after present cursor position and closest to the second symbol of current cursor
The code segment that position terminates as can release code code segment.
Preferably, wherein the preset kind data include signature, annotation and author.
Preferably, wherein the processor, which calls and executes the code releasing inquiry system, further executes following step
It is rapid:
When user carries out software development using predetermined developing instrument using terminal, in the pass for receiving user's input
When key word or keyword, from the predetermined database, search out including with receive keyword or keyword phase
The code segment of matched code data and corresponding preset kind data;And
The code data of the code segment searched out and corresponding preset kind data are shown to the terminal in the user.
Code releasing inquiry method of the present invention and terminal suitable for above-mentioned code releasing inquiry method, can simplify
Manual operation in code publication and query process, saves the activity duration, and not easy to make mistakes.
Detailed description of the invention
Fig. 1 is the hardware environment figure of code releasing inquiry system preferred embodiment of the present invention.
Fig. 2 is the functional block diagram of code releasing inquiry system preferred embodiment of the present invention.
Fig. 3 is the implementation flow chart of code releasing inquiry method preferred embodiment of the present invention.
Fig. 4 is the implementation flow chart of code releasing inquiry method preferred embodiment of the present invention.
Specific embodiment
As shown in fig.1, being the hardware environment figure of code releasing inquiry system preferred embodiment of the present invention.
Code releasing inquiry system 10 described in the present embodiment can be installed and be run in terminal 1, such as personal terminal A and a
People's terminal B.The terminal 1 can be the equipment such as PC, smart phone, tablet computer.The personal terminal 3 includes input
Output equipment 11.
Further, the terminal 1 further includes having processor and storage equipment (not shown).The processor is terminal
1 arithmetic core (Core Unit) and control core (Control Unit), for explaining computer instruction therein and place
Manage the data in computer software.The storage equipment can be one or more non-volatile memory cells, as ROM,
EPROM or Flash Memory (flash memory cell) etc..The storage equipment can be built-in or be external in terminal 1.
In the present embodiment, the code releasing inquiry system 10 can be a kind of computer software comprising computer can
The program instruction code of execution, which can store in the storage equipment, in the execution of the processor
Under, it realizes following function: under programmed environment, in the code publication instruction for receiving user's sending, determining whether cursor is currently located
In programmable region, when cursor is currently at programmable region, identify that cursor is presently in by preset recognition rule
The code segment issued in region extracts code data and corresponding preset kind data in the code segment of identification, will
The code data extracted and corresponding preset kind data are stored in predetermined database, as connecting with terminal 1
In database 2.
In the present embodiment, the database 2 can be MySQL database, PostgreSQL database, SAPDB database,
InterBase database etc..
In the present embodiment, the code publication instruction, which can be, combines (example by predetermined shortcut key or shortcut key
Such as, Ctrl+Alt key+P key) triggering instruction.
In the present embodiment, the preset recognition rule be can be, for example, predefine mark can release code code
The first symbol (for example, " { ") of section starting, and can release code the second symbol (for example, " } ") for terminating of code segment;It will
The POS INT of the first symbol before present cursor position and closest to current cursor, until present cursor position connects later and most
The code segment that the position of second symbol of nearly current cursor terminates as can release code code segment.
In other embodiments of the invention, the preset recognition rule be can be, for example, generation can be issued by predefining mark
The first symbol (for example, " { ") of the code segment starting of code, and can release code code segment terminate the second symbol (for example,
"}");It will be originated before present cursor position and closest to line code before the first symbol of current cursor, until current light
The code segment that the position of the second symbol after cursor position and closest to current cursor terminates as can release code code segment.
In the present embodiment, the preset kind data include, for example, signature, annotation, author etc..
In the other embodiment of the present invention, the code releasing inquiry system 10 may be used also under the execution of the processor
To implement function such as: when user uses predetermined developing instrument, carries out software development such as Eclipse, receiving use
Family input keyword or keyword when, from the predetermined database, in database 2, search out including with
Receive the code data that keyword or keyword match code segment and corresponding preset kind data, by what is searched out
The code data of code segment and corresponding preset kind data are shown in the terminal 1 of the user, in personal terminal B.
Using above-mentioned code releasing inquiry system 10, the user of personal terminal A or personal terminal B can simply, conveniently
The source code that ground is compiled is published in the database of open source code and the user of personal terminal A and personal terminal B
It can the simply, easily source code required for inquiring it in the database of the open source code.
As shown in fig.2, being the functional block diagram of code releasing inquiry system preferred embodiment of the present invention.
The program code of the code releasing inquiry system 10 can be divided into multiple function moulds according to its different function
Block.In present pre-ferred embodiments, the code releasing inquiry system 10 may include code release module 11 and symbol lookup
Module 12.
The code release module 11 is used in the code publication instruction that the user for receiving terminal 1 issues, by the user
The source code of editor is published in the database of open source code.
In detail, the code release module 11 include instruction identification submodule 110, Code obtaining submodule 111,
Code extracting sub-module 112 and sub-module stored 113.
Described instruction identifies that submodule 110 is used under programmed environment, and the code that identification user issues issues instruction.This reality
It applies in example, the code publication instruction, which can be, is combined by predetermined shortcut key or shortcut key (for example, Ctrl+Alt
Key+P key) triggering instruction.
The Code obtaining submodule 111 is used in the code publication instruction for receiving user's sending, and when cursor is current
When in programmable region, identify that cursor is presently in the code segment issued in region by preset recognition rule.
In the present embodiment, the preset recognition rule be can be, for example, predefine mark can release code code
The first symbol (for example, " { ") of section starting, and can release code the second symbol (for example, " } ") for terminating of code segment;It will
The POS INT of the first symbol before present cursor position and closest to current cursor, until present cursor position connects later and most
The code segment that the position of second symbol of nearly current cursor terminates as can release code code segment.
In other embodiments of the invention, the preset recognition rule be can be, for example, generation can be issued by predefining mark
The first symbol (for example, " { ") of the code segment starting of code, and can release code code segment terminate the second symbol (for example,
"}");It will be originated before present cursor position and closest to line code before the first symbol of current cursor, until current light
The code segment that the position of the second symbol after cursor position and closest to current cursor terminates as can release code code segment.
The code extracting sub-module 112 is used to extract code data in the code segment of identification and corresponding default
Categorical data.
In the present embodiment, the preset kind data include, for example, signature, annotation, author etc..
The sub-module stored 113 is used to for the code data extracted and corresponding preset kind data being stored in preparatory
In determining database, in the database 2 that is such as connect with terminal 1.
In the present embodiment, the database 2 can be MySQL database, PostgreSQL database, SAPDB database,
The database of the open source codes such as InterBase database.
The symbol lookup module 12 from the database of the open source code for inquiring source required for user
Code.
In detail, the symbol lookup module 12 includes code retrieval submodule 120 and output sub-module 121.
The symbol lookup submodule 120 is used to use predetermined developing instrument as user, as Eclipse progress is soft
When part is developed, when receiving the keyword or keyword of user's input, from the predetermined database, such as database
In 2, search out including with the code segment and corresponding default class that receive the code data that keyword or keyword match
Type data.
The output sub-module 121 is for showing the code data of the code segment searched out and corresponding preset kind data
Show the terminal 1 in the user, in personal terminal B.
As shown in fig.3, being the method implementation flow chart of code releasing inquiry method preferred embodiment of the present invention.This implementation
The example code releasing inquiry method is not limited to step shown in flow chart, furthermore in step shown in flow chart, Mou Xiebu
Suddenly it can be omitted, the sequence between step can change.
Step S10, under programmed environment, instruction identification submodule 110 is in the code publication instruction for receiving user's sending, generation
Code acquisition submodule 111 determines whether cursor is currently in programmable region.If cursor currently without be in programmable region,
Terminate process.Otherwise, if cursor is currently at programmable region, following step S11 is executed.
Step S11, Code obtaining submodule 111 by preset recognition rule identify that cursor is presently in region can
The code segment of publication.
In the present embodiment, the preset recognition rule be can be, for example, predefine mark can release code code
The first symbol (for example, " { ") of section starting, and can release code the second symbol (for example, " } ") for terminating of code segment;It will
The POS INT of the first symbol before present cursor position and closest to current cursor, until present cursor position connects later and most
The code segment that the position of second symbol of nearly current cursor terminates as can release code code segment.
In other embodiments of the invention, the preset recognition rule be can be, for example, generation can be issued by predefining mark
The first symbol (for example, " { ") of the code segment starting of code, and can release code code segment terminate the second symbol (for example,
"}");It will be originated before present cursor position and closest to line code before the first symbol of current cursor, until current light
The code segment that the position of the second symbol after cursor position and closest to current cursor terminates as can release code code segment.
Step S12, code extracting sub-module 112 extract code data in the code segment of identification and corresponding default
Categorical data.
In the present embodiment, the preset kind data include, for example, signature, annotation, author etc..
The code data extracted and corresponding preset kind data are stored in preparatory by step S13, sub-module stored 113
In determining database, in the database 2 that is such as connect with terminal 1.
In the present embodiment, the database 2 can be MySQL database, PostgreSQL database, SAPDB database,
The database of the open source codes such as InterBase database.
As shown in fig.4, being the method implementation flow chart of code releasing inquiry method preferred embodiment of the present invention.This implementation
The example code releasing inquiry method is not limited to step shown in flow chart, furthermore in step shown in flow chart, Mou Xiebu
Suddenly it can be omitted, the sequence between step can change.
Step S20, when user uses predetermined developing instrument, when carrying out software development such as Eclipse, code is looked into
It askes submodule 120 and judges whether to receive user by terminal 1, such as personal terminal B, the keyword or keyword of input.If not yet
There are the keyword or keyword for receiving user's input, then continues to execute step S20.If receive user input keyword or
Person's keyword then executes following step S21.
Step S21, symbol lookup submodule 120 is from the predetermined database, in database 2, in search out
Including with the code segment and corresponding preset kind data that receive the code data that keyword or keyword match.
Step S22, output sub-module 121 show the code data of the code segment searched out and corresponding preset kind data
Show the terminal 1 in the user, in personal terminal B.
It should be noted last that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although ginseng
It is described the invention in detail according to preferred embodiment, those skilled in the art should understand that, it can be to the present invention
Technical solution modify or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.
Claims (6)
1. a kind of code releasing inquiry method, which is characterized in that the code releasing inquiry method includes:
Identify that the code that user issues issues instruction;
In the code publication instruction for receiving user's sending, and when cursor is currently at programmable region, pass through preset identification
Rule identifies that cursor is presently in the code segment issued in region, wherein the preset recognition rule are as follows: predefines
Mark can release code code segment starting the first symbol, and can release code the second symbol for terminating of code segment, will
The POS INT of the first symbol before present cursor position and closest to current cursor, until present cursor position connects later and most
The code segment that the position of second symbol of nearly current cursor terminates as can release code code segment, alternatively, described preset
Recognition rule are as follows: predetermined mark can release code code segment starting the first symbol, and can release code code
The second symbol that section terminates will rise before present cursor position and closest to line code before the first symbol of current cursor
Begin, until the code segment conduct that the position of the second symbol after present cursor position and closest to current cursor terminates can issue generation
The code segment of code;
Extract the code data and corresponding preset kind data in the code segment of identification;And
The code data extracted and corresponding preset kind data are stored in predetermined database.
2. code releasing inquiry method as described in claim 1, which is characterized in that the preset kind data include label
Name, annotation and author.
3. code releasing inquiry method as described in claim 1, which is characterized in that the code releasing inquiry method further includes
Symbol lookup step comprising:
When user carries out software development using predetermined developing instrument using terminal, pass through the terminal receiving user
When the keyword or keyword of input, from the predetermined database, search out including with receive keyword or
The code segment for the code data that keyword matches and corresponding preset kind data;And
The code data of the code segment searched out and corresponding preset kind data are shown to the terminal in the user.
4. a kind of terminal suitable for any one of claims 1 to 3 code releasing inquiry method, which is characterized in that the end
End includes storage equipment and processor, in which:
The storage equipment, for storing a code releasing inquiry system;
The processor, for calling and executing the code releasing inquiry system, to execute following steps: identification user is issued
Code issue instruction;
In the code publication instruction for receiving user's sending, and when cursor is currently at programmable region, pass through preset identification
Rule identifies that cursor is presently in the code segment issued in region, wherein the preset recognition rule are as follows: predefines
Mark can release code code segment starting the first symbol, and can release code the second symbol for terminating of code segment, will
The POS INT of the first symbol before present cursor position and closest to current cursor, until present cursor position connects later and most
The code segment that the position of second symbol of nearly current cursor terminates as can release code code segment, alternatively, described preset
Recognition rule are as follows: predetermined mark can release code code segment starting the first symbol, and can release code code
The second symbol that section terminates will rise before present cursor position and closest to line code before the first symbol of current cursor
Begin, until the code segment conduct that the position of the second symbol after present cursor position and closest to current cursor terminates can issue generation
The code segment of code;
Extract the code data and corresponding preset kind data in the code segment of identification;And
The code data extracted and corresponding preset kind data are stored in predetermined database.
5. terminal as claimed in claim 4, which is characterized in that the preset kind data include signature, annotation and author.
6. terminal as claimed in claim 4, which is characterized in that the processor calls and executes code releasing inquiry system
System further executes following steps:
When user carries out software development using predetermined developing instrument using terminal, in the keyword for receiving user's input
Or when keyword, from the predetermined database, search out including with receive keyword or keyword matches
Code data code segment and corresponding preset kind data;And
The code data of the code segment searched out and corresponding preset kind data are shown to the terminal in the user.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610023764.1A CN105930332B (en) | 2016-01-13 | 2016-01-13 | Code releasing inquiry method and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610023764.1A CN105930332B (en) | 2016-01-13 | 2016-01-13 | Code releasing inquiry method and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105930332A CN105930332A (en) | 2016-09-07 |
CN105930332B true CN105930332B (en) | 2019-04-02 |
Family
ID=56840366
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610023764.1A Active CN105930332B (en) | 2016-01-13 | 2016-01-13 | Code releasing inquiry method and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105930332B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108255709A (en) * | 2017-12-26 | 2018-07-06 | 平安壹钱包电子商务有限公司 | Script tests method, apparatus, terminal device and the storage medium of written in code |
CN109814923A (en) * | 2018-12-28 | 2019-05-28 | 平安科技(深圳)有限公司 | Data processing method, device, computer equipment and storage medium |
CN112230809B (en) * | 2019-07-15 | 2023-08-18 | 腾讯科技(深圳)有限公司 | Method, device and storage medium for selecting computer program codes |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473076A (en) * | 2013-09-25 | 2013-12-25 | 中国联合网络通信集团有限公司 | Issuing method and issuing system for code version |
CN103677821A (en) * | 2013-12-05 | 2014-03-26 | 金蝶软件(中国)有限公司 | Method and device for publishing software development tool code |
CN104407901A (en) * | 2014-12-08 | 2015-03-11 | 北京国双科技有限公司 | Code adding method and device |
-
2016
- 2016-01-13 CN CN201610023764.1A patent/CN105930332B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103473076A (en) * | 2013-09-25 | 2013-12-25 | 中国联合网络通信集团有限公司 | Issuing method and issuing system for code version |
CN103677821A (en) * | 2013-12-05 | 2014-03-26 | 金蝶软件(中国)有限公司 | Method and device for publishing software development tool code |
CN104407901A (en) * | 2014-12-08 | 2015-03-11 | 北京国双科技有限公司 | Code adding method and device |
Also Published As
Publication number | Publication date |
---|---|
CN105930332A (en) | 2016-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9508028B2 (en) | Converting text strings into number strings, such as via a touchscreen input | |
US10789078B2 (en) | Method and system for inputting information | |
US20160328205A1 (en) | Method and Apparatus for Voice Operation of Mobile Applications Having Unnamed View Elements | |
CN107293294B (en) | A kind of voice recognition processing method and device | |
US9565301B2 (en) | Apparatus and method for providing call log | |
CN104575499B (en) | Voice control method of mobile terminal and mobile terminal | |
CN105930332B (en) | Code releasing inquiry method and terminal | |
CN105487668B (en) | Display method and device of terminal equipment | |
CN103019530B (en) | The index method of menu based on gesture identification, device and terminal thereof | |
CN108121455B (en) | Identification correction method and device | |
CN104679900A (en) | Application program searching method and device | |
EP3195115A1 (en) | Code development tool with multi-context intelligent assistance | |
JP2007334534A (en) | Apparatus and method for inputting character string, and program | |
CN110808031A (en) | Voice recognition method and device and computer equipment | |
CN110673836B (en) | Code complement method, device, computing equipment and storage medium | |
CN113127125B (en) | Page automatic adaptation method, device, equipment and storage medium | |
CN109545223B (en) | Voice recognition method applied to user terminal and terminal equipment | |
KR101624382B1 (en) | Method and device of providing searching service using log data | |
KR102179552B1 (en) | Apparatus and method for collecting evidence based on ocr | |
WO2020258652A1 (en) | Character replacement method and system, computer apparatus, and computer readable storage medium | |
CN110716914A (en) | Database configuration method, system, computer readable storage medium and terminal equipment | |
CN100416448C (en) | Computer system and its layout method | |
CN113821496B (en) | Database migration method, system, device and computer readable storage medium | |
CN113179183B (en) | Service switch state control device and method | |
CN112286486B (en) | Operation method of application program on intelligent terminal, intelligent terminal and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |