CN106951248A - Add method, device and the readable storage medium storing program for executing of code - Google Patents
Add method, device and the readable storage medium storing program for executing of code Download PDFInfo
- Publication number
- CN106951248A CN106951248A CN201710156806.3A CN201710156806A CN106951248A CN 106951248 A CN106951248 A CN 106951248A CN 201710156806 A CN201710156806 A CN 201710156806A CN 106951248 A CN106951248 A CN 106951248A
- Authority
- CN
- China
- Prior art keywords
- code
- event
- add
- needing
- addition
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/36—Software reuse
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Embodiments of the present invention provide a kind of method, device and readable storage medium storing program for executing for adding code.This method includes:Show the application interface of application program;Determine the event for needing to add code on the application interface;According to the event for needing to add code, it is determined that needing the point of addition for the code content and code content added in the code file of the application program;Based on the code content and the point of addition, code is added into the code file.Technical scheme on the premise of technical risk is reduced, can facilitate the code of developer to add operation, the efficiency of code addition be improved, while mistake can be reduced.
Description
Technical field
Embodiments of the present invention are related to communication and field of computer technology, more specifically, embodiments of the present invention are related to
And method, device and the readable storage medium storing program for executing of addition code.
Background technology
This part is it is intended that the embodiments of the present invention stated in claims provide background or context.Herein
Description recognizes it is prior art not because not being included in this part.
At present, to occurring the event in terminal display interface (such as long-press, slip, display, click etc.) addition code
Scheme mainly has lookup addition scheme and binding addition scheme.
Searching addition scheme has two kinds of conventional modes:Mode 1 is to need developer to find needs in code file
The position of code is added, code is then added at the position;Mode 2 is Application way replacement technology, that is, writes replacement method,
The code for needing to add is added in replacement method.
Binding addition scheme, which is mainly, is bound the event for needing to add code with code, to realize addition code
Operation.By taking click event as an example, in code will need add code bound with click event, and then generation own
Click event can all trigger the operation of code addition.
The content of the invention
But, scheme is added for current lookup, is added due to needing developer to search manually, therefore addition
Effect is larger to the operation dependency of developer, and probability of making a mistake is higher, for the code of repeatability, it is also desirable to developer's weight
Multiple operation, and it also requires developer's effect that Validation Code is added one by one, cumbersome.For current binding addition side
Case, because the code of same event binding is all identical, therefore can not realize the customization of code;The side of addition is bound simultaneously
Formula may produce influence to system bottom code, and technical risk is higher.
Therefore, a kind of scheme of improved addition code is highly desirable to, can be convenient on the premise of technical risk is reduced
The code addition operation of developer, improves the efficiency of code addition, while reducing mistake.
In the present context, embodiments of the present invention are expected to provide a kind of method and device for adding code.
There is provided a kind of method for adding code in the first aspect of embodiment of the present invention, including:Journey is applied in display
The application interface of sequence;Determine the event for needing to add code on the application interface;According to the event for needing to add code,
It is determined that needing the point of addition for the code content and code content added in the code file of the application program;It is based on
The code content and the point of addition, code is added into the code file.
In certain embodiments of the present invention, based on aforementioned schemes, determine to need to add code on the application interface
Event the step of, including:Load interface plug-in unit;The event for needing to add code is detected based on the interface plug-in unit.
In certain embodiments of the present invention, based on aforementioned schemes, added based on the interface plug-in unit detection needs
Plus code event the step of, including:The application controls that detection user selects on the application interface;The user is selected
The corresponding event of application controls be used as it is described need add code event.
In certain embodiments of the present invention, based on aforementioned schemes, also include:If the application controls of user's selection
To that should have multiple events, then the event selected the user in the multiple event is used as the thing for needing to add code
Part.
In certain embodiments of the present invention, based on aforementioned schemes, load after the interface plug-in unit, the interface plug-in unit
Form the transparent or semitransparent coating of the covering application interface.
In certain embodiments of the present invention, based on aforementioned schemes, it is determined that needing the code text in the application program
The step of code content added in part, including:Added according to the parameter for needing to add the event of code, and the needs
Plus the Code Template that the event of code is applicable, generate the code content.
In certain embodiments of the present invention, based on aforementioned schemes, by the parameter for needing to add the event of code
It is transferred in the Code Template, to generate the code content.
In certain embodiments of the present invention, based on aforementioned schemes, also include:For the application on the application interface
Control and the corresponding event of the application controls, create at least one described Code Template.
In certain embodiments of the present invention, based on aforementioned schemes, the step of the point of addition of the code content is determined
Suddenly, including:Obtain it is described need add code the corresponding application controls of event belonging to class, and it is described need add code
The corresponding function of event;According to the class and the function, the point of addition of the code content is determined.
In certain embodiments of the present invention, based on aforementioned schemes, based on the code content and the point of addition,
The step of code being added into the code file, including:Based on the code content and the point of addition, generation configuration text
Part;The configuration file is parsed by script file, to add code into the code file.
There is provided a kind of device for adding code in the second aspect of embodiment of the present invention, including:Display unit,
Application interface for showing application program;Processing unit, for the event for determining to need to add code on the application interface;
Determining unit, for according to the event for needing to add code, it is determined that needing to add in the code file of the application program
Plus code content and the code content point of addition;Adding device, for based on the code content and the addition
Position, code is added into the code file.
In certain embodiments of the present invention, based on aforementioned schemes, the processing unit is configured to:Interface is loaded to insert
Part;The event for needing to add code is detected based on the interface plug-in unit.
In certain embodiments of the present invention, based on aforementioned schemes, the processing unit is configured to:Detect user in institute
State the application controls selected on application interface;The corresponding event of application controls that the user is selected needs addition as described
The event of code.
In certain embodiments of the present invention, based on aforementioned schemes, if the application controls of user selection are to that should have
Multiple events, the then event selected the user in the multiple event is used as the event for needing to add code.
In certain embodiments of the present invention, based on aforementioned schemes, load after the interface plug-in unit, the interface plug-in unit
Form the transparent or semitransparent coating of the covering application interface.
In certain embodiments of the present invention, based on aforementioned schemes, the determining unit is configured to:According to the needs
The parameter of the event of code is added, and the Code Template for needing the event for adding code applicable, generate in the code
Hold.
In certain embodiments of the present invention, based on aforementioned schemes, the determining unit is configured to:The needs are added
Plus the parameter of the event of code is transferred in the Code Template, to generate the code content.
In certain embodiments of the present invention, based on aforementioned schemes, also include:Creating unit, for being answered for described
With the application controls on interface and the corresponding event of the application controls, at least one described Code Template is created.
In certain embodiments of the present invention, based on aforementioned schemes, the determining unit is configured to:Obtain described need
The class belonging to the corresponding application controls of event of code is added, and the corresponding function of event for needing to add code;Root
According to the class and the function, the point of addition of the code content is determined.
In certain embodiments of the present invention, based on aforementioned schemes, the adding device is configured to:Based on the code
Content and the point of addition, generate configuration file;The configuration file is parsed by script file, with to the code file
Middle addition code.
There is provided a kind of readable storage medium storing program for executing in the third aspect of embodiment of the present invention, program is stored thereon with, should
The method as described in aforementioned first aspect is realized when program is executed by processor.
According to the method and device of the addition code of embodiment of the present invention, by showing the application interface of application program,
And determine to need the event for adding code and the code content and code content that need to add for the event on application interface
Point of addition, code is added with code content and point of addition based on determination so that developer can be based on visual
The mode for changing operation selects the event for needing to add code on application interface, without searching code one by one in code file
Point of addition, is very easy to the code addition operation of developer.Simultaneously as code is to be added (such as may be used automatically
It is added by script file), therefore the efficiency of code addition is improved, and can effectively reduce mistake.
, can by creating at least one Code Template according to the method and device of the addition code of embodiment of the present invention
To avoid developer from repeating to write identical code, the workload of developer is effectively reduced.And by adding as needed
Plus the parameter of the event of code, and the applicable Code Template generation code content of the event so that the code content energy of generation
It is enough corresponding with specific event, realize the customization of code content.Meanwhile, the technical scheme of embodiment of the present invention also may be used
To avoid the problem of technical risk of binding addition scheme presence at present is higher.
Brief description of the drawings
Detailed description below, above-mentioned and other mesh of exemplary embodiment of the invention are read by reference to accompanying drawing
, feature and advantage will become prone to understand.In the accompanying drawings, if showing the present invention's by way of example, and not by way of limitation
Dry embodiment, wherein:
Fig. 1 diagrammatically illustrates the flow chart of the method for the addition code according to first embodiment of the present invention;
Fig. 2, which is schematically shown, needed on the determination application interface according to an embodiment of the invention addition code
Event flow chart;
Fig. 3 diagrammatically illustrates the flow chart of the method for the addition code according to second embodiment of the present invention;
Fig. 4 diagrammatically illustrates the interfacial effect figure before and after startup interface plug-in unit according to the embodiment of the present invention;
Fig. 5 diagrammatically illustrates the block diagram of the device of addition code according to the embodiment of the present invention.
In the accompanying drawings, identical or corresponding label represents identical or corresponding part.
Embodiment
The principle and spirit of the present invention is described below with reference to some illustrative embodiments.It should be appreciated that providing this
A little embodiments are used for the purpose of better understood when those skilled in the art and then realizing the present invention, and not with any
Mode limits the scope of the present invention.On the contrary, these embodiments are provided so that the disclosure is more thorough and complete, and energy
It is enough that the scope of the present disclosure is intactly conveyed into those skilled in the art.
One skilled in the art will appreciate that embodiments of the present invention can be implemented as a kind of system, device, equipment, method
Or computer program product.Therefore, the disclosure can be implemented as following form, i.e.,:Complete hardware, complete software
(including firmware, resident software, microcode etc.), or the form that hardware and software is combined.
According to the embodiment of the present invention, it is proposed that a kind of method and device for adding code.
Herein, it is to be understood that involved term " application program " refers to complete a certain or multinomial specific work
App in the computer program of work, including but not limited to mobile device (such as smart mobile phone, panel computer).Term " applies boundary
Face " refers to the user interface (User Interface, abbreviation UI) of application program.Term " event " is referred to can be with controlled member
The operation of identification, such as presses confirming button, selects some radio button or check box.Term " plug-in unit " is to follow a set pattern
The program that the application programming interfaces of model are write out.Term " script " is to use specific descriptive language, and according to certain
The executable file that form is write, also referred to as grand or autoexec.
In addition, any number of elements in accompanying drawing is used to example and unrestricted, and any name is only used for distinguishing,
Without any limitation.
Below with reference to the principle and spirit of some representative embodiments of the present invention, in detail the explaination present invention.
Summary of the invention
The inventors discovered that, the scheme of the prior art for searching addition code needs developer to search manually to be added
Plus, its additive effect is larger to the operation dependency of developer, and probability of making a mistake is higher, for the code of repeatability, it is also desirable to
Developer repeats, and it also requires developer's effect that Validation Code is added one by one, cumbersome.And bind addition
The scheme of code may produce influence to system bottom code, and technical risk is higher, and same event binding code all
It is identical, therefore the customization of code can not be realized.
Therefore, embodiments of the present invention provide a kind of method and device of improved addition code, exploitation can be made
Mode of the personnel based on visualized operation selects the event for needing to add code on application interface, is very easy to exploit person
The code addition operation of member, and the efficiency of code addition can be improved, reduce mistake.
In addition, developer can be avoided to repeat to write identical in embodiments of the present invention by creating Code Template
Code, effectively reduce the workload of developer.And the parameter and code of the event of code can be added as needed on
Template generates corresponding code content, realizes the customization of code content.Meanwhile, the technical scheme of embodiment of the present invention
The problem of technical risk of binding addition scheme presence at present is higher can also be avoided.
After the general principle of the present invention is described, lower mask body introduces the various non-limiting embodiment party of the present invention
Formula.
Application scenarios overview
Following application scenarios, which are for only for ease of, to be understood spirit and principles of the present invention and shows, embodiments of the present invention
It is unrestricted in this regard.On the contrary, embodiments of the present invention can apply to applicable any scene.
Scene one:When developer needs to add code for the event occurred on application interface, can directly it exist
Triggering needs to add the event of code on application interface, and then the device of the addition code of embodiment of the present invention can be based on opening
The event of hair personnel triggering determines the code content and corresponding point of addition of needs addition, and then from trend code file
Code content is added in relevant position, is very easy to the operation of developer.
Scene two:Developer can configure at least one Code Template, and then it is determined that the need for developer's triggering
After the event for adding code, the code for needing to add can will be generated in the incoming applicable Code Template of the parameter of the event
Content, had both solved developer and has repeated to write identical code and cause the problem of workload is larger, and can also realize code
The customization of content.
Illustrative methods
With reference to above-mentioned application scenarios, adding according to exemplary embodiment of the invention is described referring to figs. 1 to Fig. 4
Plus the method for code.
Fig. 1 diagrammatically illustrates the flow chart of the method for the addition code according to first embodiment of the present invention.
As shown in figure 1, according to the method for the addition code of first embodiment of the present invention, including:
Step S12, shows the application interface of application program.
In embodiments of the present invention, the application interface of application program can be preferably shown by touch display screen,
Interaction can be so convenient for.Certainly, embodiments of the present invention are not limited to this, such as can also pass through common non-touch
Display screen is touched to show the application interface of application program.
Step S14, determines the event for needing to add code on the application interface.
According to the exemplary embodiment of the present invention, as shown in Fig. 2 step S14 includes:
Step S142, loads interface plug-in unit.
Visualization behaviour there is provided user can be carried out on the premise of displaying application interface directly perceived is ensured by interface plug-in unit
Make.In embodiments of the present invention, after interface plug-in unit is loaded, the interface plug-in unit can form the transparent of covering application interface
Or translucent coating.
Step S144, the event for needing to add code is detected based on the interface plug-in unit.
According to an illustrative embodiment of the invention, step S144 includes:Detection user selects on the application interface
Application controls, the corresponding event of application controls that the user is selected be used as it is described need add code event.
Wherein, if the application controls of user's selection are to that should have multiple events, by the user in the multiple event
The event of selection is used as the event for needing to add code.
Specifically, when the application controls that user selects are to that there should be multiple events, list or the side of combobox can be passed through
Multiple events are presented to user by formula, in order to which user is selected.
Step S16, according to the event for needing to add code, it is determined that needing in the code file of the application program
The point of addition of the code content of addition and the code content.
According to an illustrative embodiment of the invention, the side for the code content for determining to need addition is contained in step S16
The scheme of the point of addition of case and determination code content, is illustrated individually below:
It is determined that the code content of addition:
According to the parameter for needing to add the event of code, and the code for needing the event for adding code applicable
Template, generates the code content.In the embodiment of the present invention, it can need to add the event of code by described
Parameter is transferred in the Code Template, to generate the code content.
By the parameter for the event for being added as needed on code, and the Code Template that the event is used, generate in code
Hold, on the one hand make it that developer need not write the code of repetition, reduce the workload of developer;On the other hand also cause
The code content of generation can be corresponding with specific event, realizes the customization of code.
In embodiments of the present invention, can be corresponding for the application controls and the application controls on application interface
Event, creates at least one described Code Template.One such as can be created for the same class application controls on application interface
Or multiple Code Templates, and the applicable Code Template of the corresponding event of these application controls is determined, and then can add as needed
Plus the event of code determines its applicable Code Template.
Determine the point of addition of code content:
Obtain it is described need add code the corresponding application controls of event belonging to class, and it is described need add code
The corresponding function of event;According to the class and the function, the point of addition of the code content is determined.
It should be noted that the class and the corresponding function of event according to belonging to the corresponding application controls of event can determine generation
The insertion point of code, therefore the point of addition of code content can be determined based on this.In embodiments of the present invention, Ke Yicong
The corresponding function of event for needing to add code is obtained in the code file of application program, if there is no the thing in code file
The corresponding function of part, then need to create the corresponding function of the event.
Step S18, based on the code content and the point of addition, code is added into the code file.
According to an illustrative embodiment of the invention, step S18 includes:Based on the code content and addition position
Put, generate configuration file;The configuration file is parsed by script file, to add code into the code file.
In the embodiment of the present invention, the form of configuration file can use JSON (JavaScript Object
Notation, a kind of data interchange format of lightweight), such as it can use following forms:
[{"className":"class1","insert":[{"methodName":"method1","
insertCode":"codeXXX"},{"methodName":"method2","insertCode":"codeXXX"}],"
create":[{"methodName":"method1","insertCode":"codeXXX"},{"methodName":"
method2","insertCode":"codeXXX"}]},…]
Below by taking IOS systems addition code as an example, the technical scheme to embodiment of the present invention is illustrated:
As shown in figure 3, according to the method for the addition code of second embodiment of the present invention, including:
Step S302, Customized Code Template.The step is establishment code mould in above-mentioned first embodiment of the present invention
The step of plate, add its purpose is to the parameter for the event for being added as needed on code and the Code Template created to generate needs
Plus code content.
It should be noted that:Code Template is mainly some function templates, such as clicking on what the event of control was customized
Code Template can be [TrackManager XXXButtonClicked], wherein " XXX " in the template and concrete operations
Control is relevant, can so realize the customization of code.
Step S304, runnable interface plug-in unit is operated on the plug-in unit of interface, and selection needs to add the event of code.Should
Step is an illustrative embodiments of step S14 in above-mentioned first embodiment of the present invention, i.e., shown in Fig. 2 the step of
S142 and step S144 process.Certainly, it is necessary to first show the application interface of application program before step S304.
As shown in figure 4, after startup interface plug-in unit, the interface plug-in unit can form covering the translucent of application interface and cover
Cap rock.After trigger action (such as long-press), click on the control 402 shown in Fig. 4 and select Code Template, and then this is clicked on
Parameter (such as character string " search ") input code template generation code content of event.The process is the present invention above-mentioned first
Step S16's implements process in individual embodiment.
It should be noted that after startup interface plug-in unit, the interface plug-in unit can also form the transparent of covering application interface
Coating.
Step S306, generates configuration file.The configuration file format such as generated is as follows:
[{"className":"SubscribeViewController","insert":[{"methodName":"
onSearchButtonClick","insertCode":"TrackManager searchButtonClicked"}]}]
Code content is added to code file by step S308, Run Script document analysis configuration file.Specifically,
, can be in SubscribeViewController classes after Run Script file for the example in step S306
The end addition code [TrackManager searchButtonClicked] of onSearchButtonClick methods.
Step S306 and step S308 shown in Fig. 3 are step S18 in above-mentioned first embodiment of the present invention
One illustrative embodiments, that is, generate configuration file, and parses the configuration file based on script file come into code file
Add code content.
Exemplary means
After the method for exemplary embodiment of the invention is described, next, with reference to Fig. 5 to exemplary reality of the invention
The device for applying the addition code of mode is illustrated.
Reference picture 5, the device 500 of addition code according to the embodiment of the present invention, including:Display unit 502, processing
Unit 504, determining unit 506 and adding device 508.
Specifically, display unit 502 is used for the application interface for showing application program;Processing unit 504 is described for determining
The event of addition code is needed on application interface;Determining unit 506 is used for according to the event for needing to add code, it is determined that needing
The code content and the point of addition of the code content to be added in the code file of the application program;Adding device
508 are used to be based on the code content and the point of addition, and code is added into the code file.
In certain embodiments of the present invention, based on aforementioned schemes, the processing unit 504 is configured to:Load interface
Plug-in unit;The event for needing to add code is detected based on the interface plug-in unit.
In certain embodiments of the present invention, based on aforementioned schemes, the processing unit 504 is configured to:Detect user
The application controls selected on the application interface;The corresponding event of application controls that the user is selected is used as the needs
Add the event of code.
In certain embodiments of the present invention, based on aforementioned schemes, if the application controls of user selection are to that should have
Multiple events, the then event selected the user in the multiple event is used as the event for needing to add code.
In certain embodiments of the present invention, based on aforementioned schemes, load after the interface plug-in unit, the interface plug-in unit
Form the transparent or semitransparent coating of the covering application interface.
In certain embodiments of the present invention, based on aforementioned schemes, the determining unit 506 is configured to:According to described
The parameter of the event of addition code is needed, and the Code Template for needing the event for adding code applicable, generate the generation
Digital content.
In certain embodiments of the present invention, based on aforementioned schemes, the determining unit 506 is configured to:By the need
The parameter for adding the event of code is transferred in the Code Template, to generate the code content.
In certain embodiments of the present invention, based on aforementioned schemes, also include:Creating unit 510, for for described
Application controls and the corresponding event of the application controls on application interface, create at least one described Code Template.
In certain embodiments of the present invention, based on aforementioned schemes, the determining unit 506 is configured to:Obtain described
Need to add the class belonging to the corresponding application controls of event of code, and the corresponding letter of event for needing to add code
Number;According to the class and the function, the point of addition of the code content is determined.
In certain embodiments of the present invention, based on aforementioned schemes, the adding device 508 is configured to:Based on described
Code content and the point of addition, generate configuration file;The configuration file is parsed by script file, with to the code
Code is added in file.
Example devices
After the method and apparatus of exemplary embodiment of the invention are described, next, introducing according to the present invention's
The equipment of the addition code of another exemplary embodiment.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or
Program product.Therefore, various aspects of the invention can be implemented as following form, i.e.,:It is complete hardware embodiment, complete
Complete Software Implementation (including firmware, microcode etc.), or the embodiment combined in terms of hardware and software, it can unite here
Referred to as " circuit ", " module " or " system ".
In some possible embodiments, can at least it be included according to the equipment of the addition code of embodiment of the present invention
At least one processing unit and at least one memory cell.Wherein, the memory cell has program stored therein code, when described
When program code is performed by the processing unit so that the processing unit performs above-mentioned " illustrative methods " part of this specification
Described according to various illustrative embodiments of the invention addition code method in step.For example, the processing is single
Member can perform step S12 as shown in fig. 1, show the application interface of application program;Step S14, determines application circle
The event of addition code is needed on face;Step S16, according to the event for needing to add code, it is determined that needing in the application
The code content and the point of addition of the code content added in the code file of program;Step S18, based in the code
Hold and the point of addition, code is added into the code file.And for example, processing unit can also be performed as in Fig. 2 and Fig. 3
Step shown in any figure.
Exemplary process product
In some possible embodiments, various aspects of the invention are also implemented as a kind of shape of program product
Formula, it includes program code, when described program product is run in equipment, and described program code is used to perform the equipment
The addition code according to various illustrative embodiments of the invention described in above-mentioned " illustrative methods " part of this specification
Step in method, for example, the equipment can perform step S12 as shown in fig. 1, shows application circle of application program
Face;Step S14, determines the event for needing to add code on the application interface;Step S16, needs to add code according to described
Event, it is determined that needing the addition position of the code content added in the code file of the application program and the code content
Put;Step S18, based on the code content and the point of addition, code is added into the code file.And for example, it is described
Terminal device can also perform the step as shown in any figure in Fig. 2 and Fig. 3.
Described program product can use any combination of one or more computer-readable recording mediums.Computer-readable recording medium can be readable letter
Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, red
System, device or the device of outside line or semiconductor, or any combination above.The more specifically example of readable storage medium storing program for executing
(non exhaustive list) includes:Electrical connection, portable disc with one or more wires, hard disk, random access memory
(RAM), read-only storage (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc
Read memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Readable signal medium can be included in a base band or as the data-signal of carrier wave part propagation, wherein carrying
Readable program code.The data-signal of this propagation can take various forms, including --- but being not limited to --- electromagnetism letter
Number, optical signal or above-mentioned any appropriate combination.Readable signal medium can also be beyond readable storage medium storing program for executing it is any can
Read medium, the computer-readable recording medium can send, propagate or transmit for by instruction execution system, device or device use or
Program in connection.
The program code included on computer-readable recording medium can be transmitted with any appropriate medium, including --- but being not limited to ---
Wirelessly, wired etc. or above-mentioned any appropriate combination.
It can be write with any combination of one or more programming languages for performing the program that the present invention is operated
Code, described program design language includes object oriented program language-Java, C++ etc., also including routine
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user
Performed on computing device, part performs or remotely counted completely on a remote computing on the user computing device for part
Calculate and performed on equipment or server.In the situation of remote computing device is related to, remote computing device can pass through any kind
Network --- including LAN (LAN) or wide area network (WAN)-be connected to user calculating equipment, or, it may be connected to it is outer
Portion's computing device (such as using ISP come by Internet connection).
Although it should be noted that be referred in above-detailed addition code device some units or subelement,
But what this division was merely exemplary, it is not enforceable.In fact, according to the embodiment of the present invention, retouching above
Two or more modules or the feature and function of unit stated can embody in a module or unit.Conversely, retouching above
The module or the feature and function of unit stated can be further divided into being embodied by multiple modules or unit.
In addition, although the operation of the inventive method is described with particular order in the accompanying drawings, this do not require that or
Hint must be performed according to the particular order these operation, or the operation having to carry out shown in whole could realize it is desired
As a result.Additionally or alternatively, it is convenient to omit some steps, multiple steps are merged into a step execution, and/or by one
Step is decomposed into execution of multiple steps.
Although describing spirit and principles of the present invention by reference to some embodiments, it should be appreciated that, this
Invention is not limited to disclosed embodiment, and the division to each side does not mean that the feature in these aspects can not yet
Combination is this to divide merely to the convenience of statement to be benefited.It is contemplated that cover appended claims spirit and
In the range of included various modifications and equivalent arrangements.
Claims (10)
1. a kind of method for adding code, including:
Show the application interface of application program;
Determine the event for needing to add code on the application interface;
According to the event for needing to add code, it is determined that in the code that needs are added in the code file of the application program
Hold the point of addition with the code content;
Based on the code content and the point of addition, code is added into the code file.
2. according to the method described in claim 1, wherein it is determined that needing to add the step of the event of code on the application interface
Suddenly, including:
Load interface plug-in unit;
The event for needing to add code is detected based on the interface plug-in unit.
3. method according to claim 2, wherein, the event for needing to add code is detected based on the interface plug-in unit
The step of, including:
The application controls that detection user selects on the application interface;
The corresponding event of application controls that the user is selected is used as the event for needing to add code.
4. according to the method described in claim 1, wherein it is determined that needing the generation added in the code file of the application program
The step of digital content, including:
According to the parameter for needing to add the event of code, and the code mould for needing the event for adding code applicable
Plate, generates the code content.
5. method according to claim 4, wherein, the parameter for needing to add the event of code is transferred to the generation
In code mask, to generate the code content.
6. method according to claim 4, also includes:
For the application controls on the application interface and the corresponding event of the application controls, at least one described code is created
Template.
7. according to the method described in claim 1, wherein it is determined that the step of the point of addition of the code content, including:
Acquisition is described to need to add the class belonging to the corresponding application controls of event of code, and the thing for needing to add code
The corresponding function of part;
According to the class and the function, the point of addition of the code content is determined.
8. method according to any one of claim 1 to 7, wherein, based on the code content and the point of addition,
The step of code being added into the code file, including:
Based on the code content and the point of addition, configuration file is generated;
The configuration file is parsed by script file, to add code into the code file.
9. a kind of device for adding code, including:
Display unit, the application interface for showing application program;
Processing unit, for the event for determining to need to add code on the application interface;
Determining unit, for according to the event for needing to add code, it is determined that needing the code file in the application program
The point of addition of the code content of middle addition and the code content;
Adding device, for based on the code content and the point of addition, code to be added into the code file.
10. a kind of readable storage medium storing program for executing, is stored thereon with program, such as claim 1 to 8 is realized when the program is executed by processor
Any one of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710156806.3A CN106951248B (en) | 2017-03-16 | 2017-03-16 | Method and device for adding codes, readable storage medium and computing equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710156806.3A CN106951248B (en) | 2017-03-16 | 2017-03-16 | Method and device for adding codes, readable storage medium and computing equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106951248A true CN106951248A (en) | 2017-07-14 |
CN106951248B CN106951248B (en) | 2020-09-18 |
Family
ID=59473621
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710156806.3A Expired - Fee Related CN106951248B (en) | 2017-03-16 | 2017-03-16 | Method and device for adding codes, readable storage medium and computing equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106951248B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108776569A (en) * | 2018-04-20 | 2018-11-09 | 贵阳朗玛信息技术股份有限公司 | A kind of amending method and device controlling compiling option file |
CN109117127A (en) * | 2018-08-21 | 2019-01-01 | 水木康益(北京)信息技术有限公司 | Program code generation method, device and computer readable storage medium |
CN109522010A (en) * | 2018-11-22 | 2019-03-26 | 网易(杭州)网络有限公司 | Initial code adding method and device, storage medium, electronic equipment |
WO2019071895A1 (en) * | 2017-10-10 | 2019-04-18 | 平安科技(深圳)有限公司 | Data processing method for multiple associated business systems, electronic device and medium |
CN110020298A (en) * | 2017-10-27 | 2019-07-16 | 北京国双科技有限公司 | Parameter display method and apparatus |
CN111435312A (en) * | 2019-01-15 | 2020-07-21 | 北京嘀嘀无限科技发展有限公司 | Application program management method and device and electronic equipment |
CN112346726A (en) * | 2020-03-16 | 2021-02-09 | 成都华微电子科技有限公司 | Method for automatically generating design code based on form information |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060052884A1 (en) * | 2004-09-08 | 2006-03-09 | Staples Mathew L | User interface builder application for building automation |
US20100011319A1 (en) * | 1996-05-10 | 2010-01-14 | Apple Inc. | Graphical user interface having contextual menus |
CN101807209A (en) * | 2010-04-14 | 2010-08-18 | 深圳市同洲电子股份有限公司 | Method and system for manufacturing webpage, client and server |
CN102707945A (en) * | 2012-04-11 | 2012-10-03 | 佳都新太科技股份有限公司 | Implementation method of form designer based on layout template in Eclipse |
CN104899217A (en) * | 2014-03-06 | 2015-09-09 | 阿里巴巴集团控股有限公司 | Method and apparatus for implementing customized function |
CN104933019A (en) * | 2015-06-05 | 2015-09-23 | 亚信科技(南京)有限公司 | List generating method and device |
CN105335071A (en) * | 2015-10-26 | 2016-02-17 | 百度在线网络技术(北京)有限公司 | Method and device for displaying page elements |
-
2017
- 2017-03-16 CN CN201710156806.3A patent/CN106951248B/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100011319A1 (en) * | 1996-05-10 | 2010-01-14 | Apple Inc. | Graphical user interface having contextual menus |
US20060052884A1 (en) * | 2004-09-08 | 2006-03-09 | Staples Mathew L | User interface builder application for building automation |
CN101807209A (en) * | 2010-04-14 | 2010-08-18 | 深圳市同洲电子股份有限公司 | Method and system for manufacturing webpage, client and server |
CN102707945A (en) * | 2012-04-11 | 2012-10-03 | 佳都新太科技股份有限公司 | Implementation method of form designer based on layout template in Eclipse |
CN104899217A (en) * | 2014-03-06 | 2015-09-09 | 阿里巴巴集团控股有限公司 | Method and apparatus for implementing customized function |
CN104933019A (en) * | 2015-06-05 | 2015-09-23 | 亚信科技(南京)有限公司 | List generating method and device |
CN105335071A (en) * | 2015-10-26 | 2016-02-17 | 百度在线网络技术(北京)有限公司 | Method and device for displaying page elements |
Non-Patent Citations (2)
Title |
---|
SUITING: "Xcode概览:构建用户界面", 《HTTP://WWW.COCOACHINA.COM/ARTICLES/10585》 * |
王翠萍: "《移动Web开发从入门到精通》", 31 August 2016, 中国铁道出版社 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019071895A1 (en) * | 2017-10-10 | 2019-04-18 | 平安科技(深圳)有限公司 | Data processing method for multiple associated business systems, electronic device and medium |
CN110020298A (en) * | 2017-10-27 | 2019-07-16 | 北京国双科技有限公司 | Parameter display method and apparatus |
CN108776569A (en) * | 2018-04-20 | 2018-11-09 | 贵阳朗玛信息技术股份有限公司 | A kind of amending method and device controlling compiling option file |
CN109117127A (en) * | 2018-08-21 | 2019-01-01 | 水木康益(北京)信息技术有限公司 | Program code generation method, device and computer readable storage medium |
CN109522010A (en) * | 2018-11-22 | 2019-03-26 | 网易(杭州)网络有限公司 | Initial code adding method and device, storage medium, electronic equipment |
CN109522010B (en) * | 2018-11-22 | 2022-02-18 | 网易(杭州)网络有限公司 | Initialization code adding method and device, storage medium and electronic equipment |
CN111435312A (en) * | 2019-01-15 | 2020-07-21 | 北京嘀嘀无限科技发展有限公司 | Application program management method and device and electronic equipment |
CN111435312B (en) * | 2019-01-15 | 2023-09-29 | 北京嘀嘀无限科技发展有限公司 | Application program management method and device and electronic equipment |
CN112346726A (en) * | 2020-03-16 | 2021-02-09 | 成都华微电子科技有限公司 | Method for automatically generating design code based on form information |
CN112346726B (en) * | 2020-03-16 | 2023-12-12 | 成都华微电子科技股份有限公司 | Method for automatically generating design codes based on form information |
Also Published As
Publication number | Publication date |
---|---|
CN106951248B (en) | 2020-09-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106951248A (en) | Add method, device and the readable storage medium storing program for executing of code | |
CN107943691B (en) | Method and device for automatically generating function test page of intelligent contract | |
CN107491329A (en) | Docker mirror images construction method, equipment, storage medium and electronic installation | |
CN110531962B (en) | Development processing method and device for applet and computer readable storage medium | |
CN102187314B (en) | Interactive design environments to visually model, debug and execute resource oriented programs | |
US20190005013A1 (en) | Conversation system-building method and apparatus based on artificial intelligence, device and computer-readable storage medium | |
CN108292231A (en) | It generates and applies from data | |
US11048485B2 (en) | User interface code re-use based upon machine learning of design documents | |
CN106844181A (en) | Method, system and mobile terminal for recording user behavior | |
US20160314107A1 (en) | Collating and intelligently sequencing installation documentation | |
CN109634579A (en) | Code generating method, device, computer installation and storage medium | |
US8977968B2 (en) | Pseudo-remote terminal IOTA mobile diagnostics and electronic customer care | |
CN107704499A (en) | A kind of page jump control method and device of application program | |
CN106776327A (en) | A kind of application program regression testing method and device | |
CN109522010A (en) | Initial code adding method and device, storage medium, electronic equipment | |
CN110058861A (en) | Source code processing method and processing device, storage medium, electronic equipment | |
CN106844182A (en) | Method, system and mobile terminal for recording user behavior | |
CN110480633A (en) | A kind of method, apparatus and storage medium controlling equipment | |
CN106952426A (en) | Data processing method and device | |
CN113296772A (en) | Page configuration method and device, computer equipment and readable storage medium | |
JP5258231B2 (en) | Remote management system and method for portable electronic device | |
CN106095739B (en) | Information creating method and information creating device | |
Pacey | Starterator guide | |
CN108241488A (en) | A kind of system and method for generating APP interfaces | |
CN104657139B (en) | Visualization command stream for direct fault location generates system and method |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200918 |
|
CF01 | Termination of patent right due to non-payment of annual fee |