CN1148652C - Hierarchically structural control information editor - Google Patents
Hierarchically structural control information editor Download PDFInfo
- Publication number
- CN1148652C CN1148652C CNB008107572A CN00810757A CN1148652C CN 1148652 C CN1148652 C CN 1148652C CN B008107572 A CNB008107572 A CN B008107572A CN 00810757 A CN00810757 A CN 00810757A CN 1148652 C CN1148652 C CN 1148652C
- Authority
- CN
- China
- Prior art keywords
- data
- context
- code
- template
- key element
- 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.)
- Expired - Fee Related
Links
Images
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/33—Intelligent editors
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Document Processing Apparatus (AREA)
Abstract
The first process provides a context sensitive editor to create, modify and display hierarchically structured control information. The editor provides action choices appropriate to the immediately current context, thereby simplifying the manipulation protocol of the user. Because the editor understands the relationships and multiplicity between the contexts, its editor and display represents the repetition and conditionality of the blocks without resorting to a scripting language. The editor displays the control information according to the display rules of the associated context. The presentation clearly differentiates between the bulk text, the structure in which the text resides, and parameterized elements. The editor effectively manipulates what is meta control information in a way that displays it as information. The second process provides a method to systematically transform the control information into a machine-understandable format, such as code generator script data.
Description
Technical field
What the present invention is directed to is a kind of system and method, and it is used for the template of source code is edited in the target language that has used graphic user interface.Say more specifically, what the present invention is directed to is a kind of system and method, and the programmer can come the object code that has context metadata is done parametrization by application domain therein.The programmer determine code repeatedly and nested structure, this clear in structure is directly perceived, safeguards easily and in full accord.
Background technology
By common saying, OO technology is more pressed close to real world than conventional art, and almost all makes by modeling tool.When building a complication system, set up common standard between software programmer and the client easily, this helps them to refine system requirements efficiently.OO technology also helps them to build a system of expansion easily, especially when using framework.
Programmer and analysts logically describe the commercial use of application program with modeling tool, this logical depiction be to concrete programming language, application program use the operating system of operation and hardware " specific implementation " take out pictureization.
Why more popular Object oriented programming is, and one of reason is that the use repeatedly of software has become ever more important.The cost of developing new system is the gangster not, safeguards that their cost is then higher.Recently, an investigation of being undertaken by the Wilma Osborne. of the national Bureau of Standards shows, the spending that is used for system maintenance has accounted for 60% to 85% (Ware Meyers. interview Wilma Osborne., IEEE software 5 (3): 104-105,1988) of software total cost.
Traditionally, the programmer will lean on " cutting stickup " to realize repeatedly or approximate repeatedly method.It is a target source code that kind of a template is arranged, and explains in the place that change is arranged, and is kept at common point and is used repeatedly by manual intervention by the programmer.The programmer or other programmer that create this target source code block copy suitable code line and paste in the code of oneself writing, and make suitable change by special-purpose, thereby use these code lines repeatedly.This method will be made mistakes unavoidably, and is also very time-consuming, because the programmer not only will (being repeatedly sometimes) copy required code line, must replace to their corresponding equivalence value to all suitable assembly names.This is so-called just: programme with the source code template that has note.
Some software Core Generator provides the text generation template for the programmer, and it comprises the parametrization source code lines, is used for newly-built computing or assembly.These text generation templates not only allow the programmer to use by the parameterized target source code of context variable and define the complete operation rule, also allow the programmer to use filtered variable, thus specify selected they use the assembly of generating code.Code generator handle component and attribute filtered variable are used to filter the information from modeling tool as choice criteria, and transplant in the dynamic generation text of modeling tool.Context variable is represented: the assembly or the attributive character name that are replaced to the actual characteristic value by code generator.These actual characteristic values and the Attribute Association of working as in front assembly or the dynamic text.
Above-mentioned code generator is used to transmit and generates control and customization constantly, comes conformable frame and assembly with this, and these assemblies are developed with modeling tool of today and programming language.The text generation template is to create with programmer's instruction, and programmer's instruction is used mechanical grammer and write as, and is used for replacing any context variable in the parametrization source code of being given by source code generator.For example, certain line code can be: " Persistence Schema=newPersistence Schema (" %001 "); With (﹠amp; Class name) ", " %001 " wherein is parameter symbol, and the expression maker will be inserted the value of context variable at this, for example the value of context variable "<class name〉".The programmer can only use these parameters to accord with the generation template that can create text, the programmer is when the name assembly, be consistent for asking, must in brain, set up the tabulation of a parameter symbol, especially when from %001 to %999, needing related with context variable respectively parameter symbol to surpass one.A parameter symbol can appear in the parametrization source code more than once, because it is total related with identical context variable.These parameter symbols are unlike in the imparametrization form such, and they do not allow the programmer to key in code, and in this sense, they are not user friendly.Have again, must in code line, accord with by defined parameters, can correct translation to guarantee maker.In above-mentioned example, only add " with (﹠amp; Class name) " instruction can be ordered maker: parameter symbol will be replaced by the currency of context variable, and the current class in the dynamic context of this context variable and maker is related.And, when certain part of code is replaced to the choice criteria that filtered variable is provided more than once and carries out the attribute of assembly of addressing, only comprise type instruction " repeatForEach; Attribute private instanceusing (﹠amp; Attribute name; ﹠amp; Attribute attributeClassName; " can guarantee approximate computing repeatedly.In this case, code generator can become source code to template transformation, and the specification of a model of system and filtered variable has been used in this conversion, defines this filtered variable and is intended to specify a certain assembly must use what template.
The programmer also can thisly depend on key word (for example, %001) and keyword definition (for example, repeatForEach ... using ... or with ...) grammer, but consider the performed instruction of the algorithm of giving programming language is linked with the parametrization code, picture is being authorized the U.S. Patent number No.5 of Lindsey, 675,801 li instructed such, this software is used the expression formula that other operation result is found the solution parametric form.Say more specifically, for example, the explanation source code template of being write with the C language, be used for data-oriented object, also be NumericData-ItemObject, also be used for the C variable of expression by name " IDNumber ", used in this embodiment type instruction " int<self VarName 〉; ", " int " wherein and "; " be one section source code of this source code template, the indication of maker then is "<selfVarName〉"."<" in this example and "〉" be to define symbol arbitrarily, indicate the initial of maker.In this case, object identifier is mark " self ", represents that it is to be requested the object that the oneself generates, i.e. its variable name " IDNumber "; Message identifier is mark " VarName ", promptly is sent to the message of object " self ".This information order " self " object: when being used to variable declaration, return the word string of representing it.In this demonstration of Lindsey, the NumericDataItemObject of " IDNumber " by name can return word string " IDNumber ".The target language source code fragment that draws thus is " int IDNumber ", and it is the source code fragment of C language.
Color and picture have been used in the source code editing machine, promoting the understanding to algorithm flow, but never are used for illustrating the structure of the information that is provided, such as repeatedly and/or nested context block.For example, in the if-then-else statement, use different colours to represent its conditional expression, true expression and the false expression formula carried out based on the result of conditional expression.Picture never is used to explain this fact: promptly, same if-then-else expression formula is used in the assembly algorithm of being given repeatedly for the attribute that respectively meets the choice criteria collection.
United States Patent (USP) 5,603,018 has instructed a kind of system that is used for program development, and it has the graphic editor that can hierarchically represent appointed object, and can change between the representative form of different graphic editing machine.
Summary of the invention
So the present invention aims to provide a kind of editing machine, make the programmer can create clear and intuitive and template efficiently.
The present invention also aims to provide a kind of editing machine, and is wherein clear and legible with nested code repeatedly.
The present invention also aims to provide a kind of editing machine that is used to create the source code template, the template that it obtains to want with minimum programmer's manual intervention.The present invention aims to provide a kind of Template Editors again, to satisfy the need of editing template source code.This Template Editors is applicable to various environment, such as server based on WWW, and framework environment, code generates and other.
The present invention also is intended to use editing machine to generate script template.
The present invention also aims to provide a kind of system and method that is used to show hierarchy data, thereby helper person comes edited source code with graphic user interface.
For in computing environment, reaching above-mentioned intention, and, provide a kind of system according to the goal of the invention of being emphasized herein, be used for from hierarchy data, generating data, comprise: the hierarchical information delimiter is used for specifying the hierarchical information about hierarchy data parameter key element; Editing machine is used for to the hierarchy data editing template and specifies the nonparametric key element of described data; The contextual definition symbol is used for specifying the parameter key element of context parameters as data; The filter definition symbol is used for being at least one hierarchy data given filter option that this hierarchy data comprises at least one nonparametric key element and a parameter key element; And Data Generator, be used for using hierarchical information to generate data at least.
In one embodiment, preferably, native system further comprises context identification symbol, is used for a display characteristic and each filtering option to associate one by one; And Data Generator wherein is the video data maker, is used for using each display characteristic and hierarchical information to generate video data; And native system further comprises display, is used for using video data that the hierarchy data of being discerned is shown; Use the demonstration hierarchy data.
In another kind of embodiment, preferably, Data Generator is a script generator, is used for using hierarchical information, template, filtering option and the context parameters of the language source code wanted generates the script data of code generator; Use the script data that hierarchy data is transformed into code generator.
According to a further aspect in the invention, provide a kind of method, be used for generating data from hierarchy data, the step that comprises has: specify the hierarchical information about hierarchy data parameter key element; For the hierarchy data editing template and specify the nonparametric key element of described data; Specify the parameter key element of context parameters as data; Be at least one hierarchy data given filter option, this hierarchy data comprises at least one nonparametric key element and a parameter key element; And use hierarchical information to generate data at least.
In one embodiment, preferably, this method further comprises: display characteristic and each filtering option are associated one by one; And the data that wherein generated are video datas, and its generation comprises that each display characteristic of use and hierarchical information generate video data; And this method further comprises uses video data that the hierarchy data of being discerned is shown; Use the demonstration hierarchy data.
In another kind of embodiment, the data that generated are script datas, and preferably, this method comprises that further the context parameters of the language source code that uses hierarchical information, template, filtering option and want generates the script data of code generator; Use the script data that hierarchy data is transformed into code generator.
A kind of system is provided, has been used to edit source code template based on assembly.This system comprises context editing's device, the context variable when being used for keying in source code and parametrization.Context variable has been represented assembly and attributive character name, and the attributive character name is generated device and replaces to its actual eigenwert when generating.Source code be in fact be caught can be mutually nested context block in, they have represented constant type, condition type or type context block repeatedly, and conditional expression is used to have determined whether to generate the number of times that context block and context block occur in the situation of type context block repeatedly.
Other method also is provided, has been used to create source code template, context acquisition control information, and represented context variable and context block with visual effect.In the middle of this, visual effect comprises the cursor shape or and even the audio of color, sytlized font, correction.
Provide the embodiment of two uniquenesses for taking a broad view of the present invention, they all relate to the manipulation to the control information of hierarchy.First process makes that the people can efficiently create, Correction and Control information and make it visual; Second process can make this control information become the form that machine can be understood through the determinacy conversion.
First process provides the editing machine to context-sensitive, is used to create, revise and show the control information of hierarchy.This editing machine is the Action option that is suitable for current context is shown, and simplifies the user with this and handles agreement.Because editing machine is understood relation and polymorphism between the context,, and do not need by script so its graphic user interface has been represented the repeatability and the conditionality of context block.Editing machine demonstrates control information according to the oblatio rule of associated context, and this oblatio has clearly been distinguished the structure and parameter key element of big section text, text.Editing machine is shown as information to so-called first control information, thus manipulator control information efficiently.
According to a preferred embodiment of the invention, provide a kind of method and system, be used to show hierarchy data.
This method and system comprises: specify the control information about hierarchy data parameter key element; Nonparametric key element for hierarchy data editing template and specific data; Specify the parameter key element of context parameters as data; Be at least one hierarchy data given filter option, this hierarchy data comprises at least one nonparametric key element and a parameter key element; Display characteristic and each filtering option are associated one by one; Use display characteristic that the hierarchy data of being discerned is shown.
Second process provides a kind of method, can systematically be transformed into the form that machine can be understood to control information.
According to another preferred embodiment of the invention, provide a kind of method, be used for hierarchy data is transformed into the script data of code generator.This method comprises: for hierarchy data related parameter key element specified control information arranged; Nonparametric key element for hierarchy data editing template and specific data; Specify the parameter key element of context parameters as data; Be at least one hierarchy data given filter option, this hierarchy data comprises at least one nonparametric key element and a parameter key element; The context parameters of the language source code that uses control information, template, filtering option and want generates the script data of code generator.
According to the third preferred embodiment of the present invention, a kind of system and method is provided, be used for showing hierarchy data, this just needs designated parameter, editing template, appointment context,, given filter option related with display characteristic.
In fact, the programmer comes the parametrization source code with the context metadata of application domain, and definite code repeatedly and nested structure, to realize clear and intuitive and easy maintenance.
Description of drawings
So far summarized the content of invention; Preferred embodiment is described below with reference to the accompanying drawings.In the drawings:
Fig. 1 is the class schematic diagram of hierarchy data editing machine;
Fig. 2 is the demonstration of new template;
Fig. 3 is the demonstration that template is translated into script;
Fig. 4 is the demonstration that is generated source code by script;
Fig. 5 is the block diagram of demonstration and translation system;
Fig. 6 is the flow chart of steps that shows the method for hierarchy data;
Fig. 7 is a flow chart of steps of hierarchy data being translated into the method for script;
Fig. 8 shows new computing signature instrument;
The signature that Fig. 9 shows in Template Editors to be created;
Figure 10 shows the context variable that inserts in note;
Figure 11 shows the establishment of algorithm;
Figure 12 shows the context variable that inserts in algorithm;
How Figure 13 shows the access attribute rank;
Figure 14 shows the code of how writing recursive operation for attribute;
Figure 15 shows how to insert context variable in this attribute rank; With
Figure 16 shows complete template.
Embodiment
Be to promote the process that template program person writes code, created a kind of control information editing machine (hereinafter calling it " Template Editors ") of new hierarchy, this Template Editors uses editing machine to show hierarchy and parametrization code.
The fundamental purpose of the control information editing machine of hierarchy is to make the programmer create and edit the generation template with a kind of intuitionistic form that generates output that exactly likes, and like this, gives input for maker any, just can find out which kind of output of meeting generation at a glance.For making it to become possibility, Template Editors provides graphic editor (referring to Fig. 2), and the programmer can key in text word string 24 therein, inserts context variable 25 or inserts context block 23.Use various visual effects, such as text/background color, cursor/text shape or the like (context of seeing Fig. 1 shows rule 31) comes text that explicit user imports and the difference between various context variable 25 or the context block 23.Context variable 25 can't be corrected, and they are read-only word strings.Possible operation to context variable has only replacement or deletion.
Fig. 1 shows unified modeling language (UML) model that editing machine is realized.Main class is context block 23, context variable 25 and text word string 24, and text subsequently will illustrate their effect in graphic user interface (GUI) editor and script translation.
After filtrator that context block 23 is provided or condition standard, unless satisfied standard, otherwise do not generate piece.For the object that respectively meets choice criteria, context block 23 will be by instantiation.
In the practical application of being developed with object-oriented language, the consisting of of text word string 24: word string object and and the equal-sized array object of word string.The array object of text is represented the behavioural characteristic of text.For each character in the word string object, an object is all arranged on corresponding array position, this object contains the information of the figure representative of character, such as color, font size, overstriking or italic feature.The behavior, feature also stored the type of character, no matter was context variable 25 or text word string 24.These characteristics comprise behavioural characteristic, and the object linking in text on the screen and the edit model class schematic diagram is got up.
How explained later is being typed into the form that the generation template of going in the Template Editors is translated into script.Shown in class schematic diagram (Fig. 1), generating template is a sequence of context block 23.Context block contains a sequence, context variable 25 and the context block 23 of text word string 24.
The static character of text word string 24 representatives is as representative in the script form.
Context variable is placed in the script form, demonstrates the value of this variable visually at this place.In the script form, this is that the numeral (as: %001) of wearing ' % ' before one shows.The value of context variable depends on the context that uses it.
When being translated into the script form, context block is write in the script form going according to a regular set.In the situation of type context block repeatedly, write the script form to represent context block repeatedly.
Demonstration
Help illustrate the preferred embodiments of the present invention below by a demonstration.This demonstration will illustrate how defining context level (referring to Fig. 1) and each level some oblatio rule (referring to table 1), how to use the control information data of table 2 definition, how define and represent Java method (Fig. 2) template, how to generate template and obtain script, how to use the system that is entitled as " with the related source code template generator of assembly research and development " (PCT number of patent application WO00/22517) that has announced to carry out this script, with acquisition Java source code (Fig. 4).
Below context level illustrated table 2,3 and Fig. 2,3,4 in employed possible context.Employed all objects all belong to certain rank of level in the demonstration, and the contextual feature of acquisition and this level association.
Following table definition each context.For each context, also defined the feature that possible context variable, sub-context and object can be used.This definition makes Template Editors 20 can show submenu, font and the color of different context block 23.
Rank entity type display setting feature
1.1 Class white gravoply, with black engraved characters Name:String Attributes:{attribute}
1.1.1 Attributes orange end surplus Name:String Type:class
The oblatio rule of table 1. level
Table 2 shows the information that (from uml model) is used for the drive template instantiation.
Rank name entities type feature value
1.1 Cityinfo Class class?name Cityinfo
Attributes {name?country?population}
1.1.1 Name Attribute Attribute?name name
Attribute?Name Name
Attribute?type String
1.1.1 Country Attribute Attribute?name country
Attribute?Name Country
Attribute?type String
1.1.1 Population Attribute Attribute?name population
Attribute?Name Population
Attribute?type Integer
The information that table 2. obtains from uml model
Fig. 2 shows the template in the control information editing machine of hierarchy, and this demonstration is based on all kinds of and instantiation.
Show the relation between class schematic diagram and the demonstration.The example that generates template is corresponding to this template, and this example comprises context block, its representation class context; This context block comprises:
Text word string value :/* * * Take Properties result set received from database.and populate
Context variable value:<class name/〉(Class name)
Text word string value: ' s Data fields.*@param resultSet The data used in populating the
Context variable value:<class name/〉(Class name)
Text word string value: ' s Data fields.*/
public?void?setPropObjectData(java.util.Properties?resultSet){
Context block representation attribute context also comprises: If (resultSet.get ("<Attribute Name/〉")!=null
&&!(resultSet.get(etc...
Text word string value: }
The content of table 3. context block
Note below using will be better appreciated by Fig. 2:
34. these pieces are based on all kinds of and instantiation, all kinds of all will instantiation once to all control informations (text chunk, context variable or subordinate piece).
35. these are context variables, not by instantiation the time, their shape is as by "<" and "〉" the feature name that brackets.
The instantiation 36. this piece is based on each attribute is based on all kinds of and instantiation owing to comprise its piece, thus this piece can be in all kinds of instantiations arbitrarily time repeatedly.Preferably, this number of occurrence can be any more than or equal to zero integer (if the number of occurrence is arranged in the class is zero attribute, then skips this piece).
37. each all kinds of attributes all will be to these context variable instantiations once.
By control data illustrated in the table 2 is passed to template shown in Figure 2, then generated scripted code shown in Figure 3.
Referring to figs. 2 and 3, the process of drawing template establishment is as described below:
The example that generates template has marked Given information, this Given information promptly constitutes the preamble of template altogether, preamble provides template name, filtrator (in this case, filtrator is " all classes ") and template characteristic (template establishment a Java computing) in this case.templateName^!setPropObjectData!definedAs^(?&?class)
generate^(
operation^public^instance^(!setPropO?bjectData!)
definedAs^(
Then, be responsible for script by the class context block of template.In script context, embed context block by following form:
(!<block?contents>!)
So this piece has write following script for the template preamble:
(!
After this, continue to be responsible for script by its each subordinate.First subordinate is the text word string, such generation that the text word string is occurred in script by it, so the first text word string is write as:
/**
*Take?Properties?result?set?received?from?database,and?populate
*
Next key element is a context variable.In script, as previously mentioned, context variable must write quoting for object.In script, the order that occurs by context variable comes reference parameter.This order is determined that by context block context block gives each variable a sequence number, thereby has registered the context variable tabulation of oneself.
In this case, for a class name context variable is arranged.Context variable is to the appearance order of its context block inquiry oneself.
Because this context variable is first variable, it has obtained the order of oneself and has write:
%001
For all piece key elements, carry out identical process all repeatedly, the script text below promptly having drawn:
′S?Data?fields.
*@param?resultSet?The?data?used?in?populating?the%001′s?Datafields
*/
public?void?setPropObjectData(java.util.Properties?resultSet){
Be responsible for script by context block then, context block know have only with exclamation mark (! ) can finish oneself.If context block is not repetitious, and comprise a context variable at least, then can write:
!with^
If context block is repetitious (as the situation for attribute), then should write:
repeatForEach^attributeOrTargetRoleFilterExpression?^&?attribute
There is not filtrator in the said circumstances, if but attribute is private, we should Zai ﹠amp; The attribute back writes private's.
Next step, each context variable of context block request writes the initial behavioural characteristic of oneself.So context block writes:
(
Each context variable writes oneself more successively.The class name context variable has write:
&?class?name^
Owing to no longer included other context variable, so being parameter, context block adds anti-bracket, and then for oneself also to add anti-bracket:
))
For the extra block under the current generation template, the rest may be inferred, and ground continues generation script, up to intactly having generated template with script.
Bold text among Fig. 3 directly is derived from the text in Fig. 2 template, and underline text relates to context variable, and other text then relates to the structural code of script.
Need note these points:
75. main piece is based on all kinds of and instantiation; All kinds of all will be to all control informations---text chunk, context variable or the instantiation of subordinate piece are once.
All kinds ofly all to replace once context variable 76 and 77.
76. receive the context variable that is replaced in herein.
77. this is to drive the instruction that context variable is replaced.
The instantiation 78. this piece is based on each attribute is based on all kinds of and instantiation owing to comprise its piece, thus this piece can be in all kinds of instantiations arbitrarily time repeatedly.Preferably, this number of occurrence can be arbitrarily more than or equal to zero integer (if the number of occurrence is arranged in the class is zero attribute, then skips this piece).
Each all kinds of attributes all will be to context variable 79 and 80 instantiations once.
79. receive the context variable that is replaced in herein.
80. this is to drive the instruction that context variable is replaced.
Fig. 4 comprises the code that is generated, and it is write as with target language (being Java language in this case).This code is nothing but an example with template generating code shown in Figure 2.User interface shown in Figure 2 is applicable to all possible example self-evidently.
Need note these points:
81. select based on all kinds of and code that generate.
82. context variable<Class Name〉be replaced by " cityifno ".
83. replace context variable with data from example; How reference table 2 and Fig. 2 replace to understand fully.
In the zone of each attribute:
84. the context block that is generated by the Country attribute.
85. the context block that is generated by the Population attribute.
86. the context block that is generated by the Name attribute.
To use block diagram 5 and process flow diagram 6,7 to describe the preferred embodiments of the present invention in detail below.
Fig. 5 is a system chart, and this system is used for hierarchy data, and is used for the script data of generating code maker.Editing machine 120 is used for keying in and the correction template.Editing machine uses contextual definition symbol 121 to introduce context variable and parameter key element.Then, contextual definition symbol 121 uses hierarchical information delimiter 122 to obtain the contextual information of relevant template, and this context can obtain from (for example) UML modeling tool.Editing machine 120 also uses filter definition symbol 123 to define filtering option for generating source code.Contextual definition symbol 121 also accords with 125 communications with context identification, thereby is each context variable distribution display characteristic.At last, editing machine 120 sends to template on the display 126 and shows.Each parameter and nonparametric key element that display 126 uses display characteristic 124 to come indicating template.As selection, system also has the script generator 127 of code generator, and the context parameters of the template of its use editing machine 120, filter definition option one 23 and contextual definition symbol 121 generates the script data of code generator.
Fig. 6 is the flow chart of steps of method according to the preferred embodiment of the invention.Step 130 is specified hierarchical information; Step 131 editing template; Step 132 is specified context parameters; Step 133 is also wanted the given filter option; Step 134 associates display characteristic and context parameters; At last, step 135 is given the user data presentation.
Fig. 7 is the process flow diagram of other method according to the preferred embodiment of the invention.Step 140 is specified hierarchical information; Step 141 editing template; Step 142 is specified context parameters; Step 143 is also wanted the given filter option; Then step is used the script data of template, context parameters and filtering option generating code maker.
No doubt, learn from the preferred embodiments of the present invention that the script data of code generator is an independent file, it comprises all relevant informations of code generator and makes the permission code generator produce source code with target language; But to understand that also the script data of code generator may comprise incessantly that one is used for producing with target language the data file of source code by code generator.For example, the script data of code generator can comprise first file, and it is independent of context, and contains the method and the class that will generate; Also comprise second file, it contains and depends on contextual information, as the details of model.The script data of code generator also can include only and be independent of contextual data, and code generator is then looked in addition else can provide the source of depending on contextual information.
Provided a concrete demonstration below, wherein captured user interface from screen, it is to create according to a preferred embodiment of the invention.
Fig. 8 shows new computing signature instrument 38.Whether template name 40 must be that static state provides with observability 41, inheritedness 43 and the computing of computing.Return type must be defined by its class name 44 and its grouping 45.The computing name is keyed in 46 places.After finishing above-mentioned information, press OK button 39.
Fig. 9 shows the Template Editors 50 of the signature 52 of the computing that has just now to be created.The text can't directly be revised, because it is managed by organizer.For revising, can double-click the signature word string and eject computing signature instrument again.For showing that the text is to be created by computing signature instrument, it shows with different visual effects.In the accompanying drawings, because accompanying drawing is a black and white, so the color of font and background all is a gray shade; But, can use of the difference of any visual characteristic with text of different nature in the outstanding template.For example, signature can show that representation program person has only by double-clicking can change the content that comprises in this word string with the background of blueness.Space 53 is left for and is write code for computing and use, and shows it with the background color that is different from signature, and representation program person can be to this space fill substance.If (if) programmer has vision disorder, the replaceable one-tenth audio of the visual effect on the screen then.In fact can use any means, as long as can indicate the different qualities of code section.Designated treatment class filtrator 51 with which is determined/a little assemblies are to generate (not shown these steps in the accompanying drawing) that template generates by this figure.
Figure 10 shows how to create note in computing.As seen, in note, can add context variable 59, such as attribute-name 60.Note 65 after Figure 11 shows and finishes and some are by target source code that the programmer keyed in.As shown in figure 12, use process as shown in Figure 10, in the code 71 of instruction, added context variable " attribute name ".
Figure 13 shows how to create the single-character given name computing.Similarly, represent signature 95 with different background colors.Note 96 is wherein arranged, and the code of computing is at 97 places.If need carry out a part of code of this computing for the some or all of attributes of assembly repeatedly, then may key in attribute rank 98 and create a circulation.Figure 14 shows and is some attribute code line 104 repeatedly, among the figure, for the cyclic part of code has used different background color 103.Similarly, may insert context variable 109, for example attribute-name 110 (Figure 15) in the attribute level.At last, in Figure 16, intactly created template.If preserved this template, then code generator (such as PCT publication number WO 00/22517 mentioned above) can use this template and specification of a model to create source code.
The present invention can be used in the varying environment, will be illustrated some environment for use below.
One of purposes of the present invention is to hide script from the developer by the code line of drawing template establishment, thereby generate code with Core Generator, such Core Generator for example transferred the possession of with being entitled as of the application's pending trial together " with the related source code template generator of assembly research and development " (PCT number of patent application WO 00/22517) described Core Generator.In this case, use template to come to be similar to repeatedly or source code repeatedly as the assembly generation, these assemblies meet the choice criteria that generates template, and in modeling tool or Integrated Development Environment.
When the programmer keys in the context block that will be used in all classes of system, only need the method that he will use when keying in generating code and get final product.He can be in the place of desiring to write class name, with slide-mouse right click context editing device, the context variable of selecting him to want from all possible context variable is tabulated.In this case, he can select "<class name〉".With reference to the described demonstration of prior art one joint, new line code promptly becomes:
PersistenceSchema=new?PersistenceSchema(″<class?name>″);
In case selected in the menu that the slide-mouse right click is ejected after the context variable "<classname〉", editing machine just joins it in the code automatically and has gone.
When some context block is need be in same algorithm once above repeatedly, must use filtered variable to create circulation.Filtered variable determine to participate in the choice criteria of round-robin project, these projects for example: assembly, assembly subclass, superclass or attributive character.In above-mentioned demonstration, the programmer has only for circular in definition instruction can cover all properties.In new Template Editors, discern the piece context that all is closely related for all properties with visual characteristic.
For example, can discern context block with different background colors, then just nature will have been keyed in code line, and introduces context variable by the slide-mouse right click.Since editing machine knows better: all will duplicate these code lines for all properties, when the slide-mouse right click so the selection of the context variable in the context menu that ejects certainly will be different from the menu of front.These context variables belong to the context variable of same kind not to the utmost, for example, context variable "<class name〉" can be arranged in the repeatability context block, this context block is in iteration on the attribute rank of front assembly; Maybe can be arranged in the internal context piece, this context block is iteration on the surface name of being given, and this surface name relates to the current attribute of current class in the maker dynamic context.This is because maker will be clipped to suitable rank from outer level and recursively inquire about, to obtain eigenwert.Always discern circulation, so just given prominence to the outward appearance of programming with visual characteristic.Must notice: or even also may insert the context variable of (for example) representation class when on the attribute rank, writing code.This has just brought great dirigibility, because the programmer can use all context variables to come for writing code in the required computing of attribute rank.
In another environment, editing machine is used to repeatedly used code line storehouse.For example, can create the repeatedly used code of individual or networking with template.In this case because template is by parametrization, so the programmer need do any correction to code line and promptly not can be used for the engineering of oneself.This method has been save a large amount of work for the programmer.
The another demonstration of using these templates is towards WWW.Up to now, the developers of HTML(Hypertext Markup Language) can only use the pointer of correct information or mark to write web page code.They want the oblatio that the HTML code introduced can processing page, and comprise the code of the appropriate information that is used for the access server database.Similarly, the Template Editors that inserts in his the web page editing instrument makes the programmer can create the visual appearance of webpage, refreshingly considers not used the code of access data database data and cost.The programmer can write web page code and add context variable with traditional html language, and this context variable reflects when needs generate particular code for specific webpage, to the explanation from the information needed of database.For example,, can use Template Editors to create a html template, and be actual surplus operation parameter assembly when the programmer creates the page so that client can access during their account balance, such as<accountbalance 〉.When generating this code, maker can for all clients individually<accountbalance replace to correct amount.So this webpage is exactly identical In the view of the observer, except the account balance that does not almost need programmer one side programming.The present invention can be provided for the graphic user interface in this environment, and does not change essence of the present invention.
By same way as, the modified version of Template Editors allows the programmer that the source code development is template.The programmer does not need to have write code with parameterized grammer, and he can save as a file to his source code.When he remembers can recycle this code the time, he can specify with what assembly, what framework generates in the occasion of using this code.Maker is owing to clear be modeled all component of system and the relation between all key elements, so can extract the information of the exploitation code about how.Understood fully the class name and the attribute-name of model and recognized the approximate reverse multiblock of code, editing machine can be transformed into source document the parametrization source code of template, and it both can be revealed to solicit programmer's agreement, also can generate automatically and deposit.Then, maker can use this code and produce code for newly using.The programmer need not write actual parametrization code.
And, can also use the Template Editors that is embedded in the word processing application to produce template, thereby generate text, such as parameterized mailing list, it has the mark of name, address and client's account representative.
In fact, almost can use Template Editors to generate anything, as long as the information of wanting the thing that generates has been arranged.Can use the Template Editors of extending mark language (XML).Template Editors can use the XML agreement to extract to want the information of the thing that generates.Can use XML document type definition (dtd) that the employed meta data definition of Template Editors is context variable, and the dtd tree construction that can use XML defines the different stage (also promptly, being used for defining suitable filtered variable on each nested rank of compatible XML document) of understanding the parametrization source text.Can use data time definition (dtd) file that is written into XML, but not the specification of a model of building with modeling tool.In this case, the dtd of XML can replace for code generate indispensable specification of a model because he has illustrated processed data.If two files all use same dtd file, then interchangeable their data file because data have identical tissue, and causes template also to have identical behavior.
Although with reference to described embodiment the present invention has been described particularly, has been appreciated that also many corrections can occur to those skilled in the art.Correspondingly, above instructions and accompanying drawing should be as to explanations of the present invention, and unrestricted meaning.
Claims (20)
1. system that is used for from hierarchy data generating data, this system comprises:
Hierarchical information definition device is used for specifying the hierarchical information about described hierarchy data parameter key element;
Editing machine is used for to described hierarchy data editing template and specifies the nonparametric key element of described data;
The contextual definition device is used for specifying the parameter key element of context parameters as described data;
The filter definition device is used for being at least one described hierarchy data given filter option that this hierarchy data comprises at least one nonparametric key element and a parameter key element; With
Data Generator is used for using at least described hierarchical information to generate data.
2. the system of claim 1 further comprises:
The context identification device is used for a display characteristic and each described filtering option to associate one by one; Wherein
Described Data Generator is the video data maker, is used for using each described display characteristic and described hierarchical information to generate video data; Wherein, described system further comprises:
Display is used for using described video data that the described hierarchy data of being discerned is shown;
Use the demonstration hierarchy data.
3. the system of claim 2, wherein, described display characteristic is a font format.
4. the system of claim 2, wherein, described display characteristic is a background color.
5. the system of one of claim 2,3 and 4, wherein, the described template that is used for hierarchy data comprises the source code based on assembly.
6. the system of one of claim 2,3 and 4, wherein, described at least one described hierarchy data is constant type, condition type and a kind of in the type code block repeatedly.
7. the system of one of claim 2,3 and 4, wherein, described hierarchical information definition device uses hierarchical information, and it is from the modeled applications of unified modeling language.
8. the system of claim 1, wherein,
Described Data Generator is a script generator, is used for using described hierarchical information, described template, described filtering option and the described context parameters of the language source code wanted generates the script data of code generator;
Use the script data that hierarchy data is transformed into code generator.
9. the system of claim 8 further comprises translation data definition device, is used for specifying translation data, and it comprises the source code expression relevant with described key element.
10. claim 8 and one of 9 system, wherein, the script data of described code generator by code generator with generating source code, its be included in the described language source code of wanting repeatedly, at least a in nested and approximate repeatedly the source code.
11. a method that is used for generating data from hierarchy data, this method comprises:
Appointment is about the hierarchical information of described hierarchy data parameter key element;
For described hierarchy data editing template and specify the nonparametric key element of described data;
Specify the parameter key element of context parameters as described data;
Be at least one described hierarchy data given filter option, this hierarchy data comprises at least one nonparametric key element and a parameter key element; And
At least use hierarchical information to generate data.
12. the method for claim 11 further comprises:
Display characteristic and each described filtering option are associated one by one; Wherein
The data of described generation are video datas, and its generation comprises that each described display characteristic of use and described hierarchical information generate video data; And described method further comprises
Use described display characteristic that the described hierarchy data of being discerned is shown;
Use the demonstration hierarchy data.
13. the method for claim 12, wherein, for described hierarchy data editing template is included in input code in the documentwindow.
14. the method for claim 12 wherein, is specified context parameters to comprise that use context parameters delimiter defines the parameter characteristic of described parameter key element, and insert the symbology of described context parameters in described data.
15. the method for claim 14 wherein, is used the context parameters delimiter to comprise from described hierarchical information and is obtained the information to context-sensitive about described data, and the tabulation of specified available contexts parameter is provided.
16. the method for one of claim 11 to 15, wherein, described appointment hierarchical information comprises that the modeled applications that uses unified modeling language specifies described hierarchical information.
17. the method for one of claim 11 to 15, wherein, described display characteristic is a font format.
18. the method for claim 11, wherein
The data of described generation are script datas, and described generation method comprises: use described hierarchical information, described template, described filtering option and the described context parameters of the language source code wanted generates the script data of code generator;
Use the script data that hierarchy data is transformed into code generator.
19. the method for claim 18 further comprises: the specified translation data, it comprises the source code expression relevant with described key element.
20. the method for one of claim 18 and 19, wherein, the script data of described code generator by code generator with generating source code, its be included in the described language source code of wanting repeatedly, at least a in nested and approximate repeatedly the source code.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14520799P | 1999-07-23 | 1999-07-23 | |
US60/145,207 | 1999-07-23 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1364259A CN1364259A (en) | 2002-08-14 |
CN1148652C true CN1148652C (en) | 2004-05-05 |
Family
ID=22512058
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB008107572A Expired - Fee Related CN1148652C (en) | 1999-07-23 | 2000-07-24 | Hierarchically structural control information editor |
Country Status (10)
Country | Link |
---|---|
EP (1) | EP1208426A2 (en) |
JP (1) | JP2003505785A (en) |
CN (1) | CN1148652C (en) |
AU (1) | AU6144000A (en) |
BR (1) | BR0012706A (en) |
CA (1) | CA2377945A1 (en) |
HK (1) | HK1045896A1 (en) |
IL (1) | IL147665A0 (en) |
MX (1) | MXPA02000850A (en) |
WO (1) | WO2001008002A2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8832178B2 (en) | 2002-11-06 | 2014-09-09 | Noel William Lovisa | Service implementation |
US9521209B2 (en) | 2002-11-06 | 2016-12-13 | Code Valley Corp Pty Ltd | Code generation |
AU2005245983B2 (en) * | 2004-05-20 | 2011-07-07 | Code Valley Corp Pty Ltd | Code generation techniques |
WO2005114387A1 (en) * | 2004-05-20 | 2005-12-01 | Code Valley Pty Limited | Code generation techniques |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7456832B1 (en) * | 1989-05-15 | 2008-11-25 | International Business Machines Corporation | Object database-driven interactive shell for a data processing system |
US5603018A (en) * | 1991-07-15 | 1997-02-11 | Mitsubishi Denki Kabushiki Kaisha | Program developing system allowing a specification definition to be represented by a plurality of different graphical, non-procedural representation formats |
EP0897148A1 (en) * | 1997-08-14 | 1999-02-17 | International Business Machines Corporation | Method of error handling in a framework |
US6226783B1 (en) * | 1998-03-16 | 2001-05-01 | Acuity Imaging, Llc | Object oriented method of structuring a software step program |
-
2000
- 2000-07-24 CN CNB008107572A patent/CN1148652C/en not_active Expired - Fee Related
- 2000-07-24 JP JP2001513029A patent/JP2003505785A/en active Pending
- 2000-07-24 WO PCT/CA2000/000841 patent/WO2001008002A2/en not_active Application Discontinuation
- 2000-07-24 MX MXPA02000850A patent/MXPA02000850A/en unknown
- 2000-07-24 CA CA002377945A patent/CA2377945A1/en not_active Abandoned
- 2000-07-24 BR BR0012706-0A patent/BR0012706A/en not_active IP Right Cessation
- 2000-07-24 EP EP00947719A patent/EP1208426A2/en not_active Withdrawn
- 2000-07-24 AU AU61440/00A patent/AU6144000A/en not_active Abandoned
- 2000-07-24 IL IL14766500A patent/IL147665A0/en unknown
-
2002
- 2002-10-03 HK HK02107277.7A patent/HK1045896A1/en unknown
Also Published As
Publication number | Publication date |
---|---|
AU6144000A (en) | 2001-02-13 |
CA2377945A1 (en) | 2001-02-01 |
BR0012706A (en) | 2002-04-09 |
EP1208426A2 (en) | 2002-05-29 |
WO2001008002A2 (en) | 2001-02-01 |
MXPA02000850A (en) | 2004-03-19 |
WO2001008002A3 (en) | 2001-11-08 |
CN1364259A (en) | 2002-08-14 |
JP2003505785A (en) | 2003-02-12 |
IL147665A0 (en) | 2002-08-14 |
HK1045896A1 (en) | 2002-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101052948A (en) | Object process graph application development system | |
CN1043176C (en) | a telecommunications switching system | |
CN1811702A (en) | System and method for developing portal applications and automatically deploying them into a portal server application | |
CN1711522A (en) | Modeling system for graphic user interface | |
CN1120432C (en) | Method and computer for generating display control information | |
CN1276393C (en) | Web 3D image display system | |
CA2451164A1 (en) | Customizable components | |
CN1591411A (en) | Data processing system | |
CN1615507A (en) | System for hosting graphical layout/presentation objects | |
CN1508704A (en) | User interface assembly expression having simplified view | |
CN1211364A (en) | A management interworking unit and a method for producing such a unit | |
CN1337026A (en) | System and method of presenting channelized data | |
CN1969272A (en) | Importation of automatically generated content | |
CN1688970A (en) | User interface automation framework classes and interfaces | |
EP3296866B1 (en) | Method implemented by a computer that presents software-type applications based on design specifications | |
CN1564129A (en) | Method of packing member and consistent visit | |
CN1534476A (en) | Mark language and object model of vector graps | |
CN1615480A (en) | Translating configuration files among network devices | |
CN1992728A (en) | Systems and methods for facilitating group collaborations | |
WO2006111401A2 (en) | A technique for platform-independent service modeling | |
CN101052986A (en) | Document processing and management approach for reflecting changes in one representation of a document to another representation | |
CN1761943A (en) | Program creation by combining web services using graphic user interface controls | |
CN1647042A (en) | Methods for customizing software abstractions | |
CN1773508A (en) | Method for converting source file to target web document | |
CN1119046A (en) | Object-oriented constructive area system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C19 | Lapse of patent right due to non-payment of the annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |