Based on Eclipse self-defined control extended methodTechnical field
The present invention relates to Mobile solution development field, in particular it relates to one is based on Eclipse self-defined control extension sideMethod.
Background technology
There is different operating system in Mobile Development field, style is not quite similar, only according to Mobile solution development platformMiddle basic control first is difficult to support the demand of Mobile solution exploitation, moreover has developer to develop in existing Mobile solutionGood control, in order to reduce development cost, integrated to them is a problem.Such as, in an App application, developer isHaving got well a self-defined control through exploitation, it includes android version and ios version, in implementing Mobile solution platform, ifIntegrated they arrive platform, if basic control can not meet now how this does by demand in platform under development, revise androidWith ios engineering.
Summary of the invention
Therefore the present invention needs the problem solved as follows:
1, self-defined control exploitation is due to the integration problem at different Mobile operating systems.
2, expanding packet definition and generation cryptography issue.
3, the model problem of self-defined control.
4, support many sets style question of self-defined control.
It is an object of the invention to, for the problems referred to above, propose a kind of based on Eclipse self-defined control extended method,To realize improving motility and the advantage of extensibility of designer.
For achieving the above object, the technical solution used in the present invention is:
A kind of based on Eclipse self-defined control extended method, including,
The extension mechanism of self-defined control is integrated in the first item of eclipse;
By configuration file and the resource information of xml storage self-defined control;
Compressed configuration file and resource information, and compressed package is encrypted;
Compressed package is decrypted and decompresses, thus the configuration file stored by xml and resource information import;
The configuration file and the resource information that are stored by the xml imported solve control initialization matter under different styles.
Preferably, described extension mechanism, including the configuration of self-defined control many sets style, the definition of self-defined control, fromThe importing of definition control and derivation.
Preferably, by the xml storage configuration file of self-defined control and resource information particularly as follows:
By the configuration information of xml storage self-defined control many sets style, by enactment document folder storage self-defined control manyThe resource file used in individual Mobile operating system and the program of operation, store the attribute extension of self-defined control by xml and openDynamic item information.
Preferably, compressed configuration file and resource information, and compressed package is encrypted particularly as follows:
By the zip compression algorithm in java, configuration file and resource information are compressed and mix AES.
Technical scheme has the advantages that
Technical solution of the present invention makes the plug-in unit as Eclipse--toolbar, not only can meet different control differentControl under style initializes, and supports the extension of developer's self-defined control, substantially increases the motility of designerAnd extensibility.Have the following characteristics that
1, the control of the self-defined exploitation of developer includes that android and ios control can be integrated in toolbar.
2, self-defined control supports simple controls and container control, meets extension demand.
3, under self-defined control supports each platform control extension include android, ios, web,Windowsphone etc..
Below by drawings and Examples, technical scheme is described in further detail.
Accompanying drawing explanation
Fig. 1 be described in the embodiment of the present invention based on Eclipse self-defined control extended method flow chart.
Detailed description of the invention
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are illustrated, it will be appreciated that preferred reality described hereinExecute example be merely to illustrate and explain the present invention, be not intended to limit the present invention.
A kind of based on Eclipse self-defined control extended method, including,
The extension mechanism of self-defined control is integrated in the first item of eclipse;
By configuration file and the resource information of xml storage self-defined control;
Compressed configuration file and resource information, and compressed package is encrypted;
Compressed package is decrypted and decompresses, thus the configuration file stored by xml and resource information import;
The configuration file and the resource information that are stored by the xml imported solve control initialization matter under different styles.
The present invention relates to owing to relating to mobile platform operating system diversity in Mobile solution platform development, style is notOne, and developer needs the extension control of each Mobile operating system the most integrated, propose unified based onEclipse, overlaps style by xml configuration more, and configuration self-defined control extends information, can the most integrated androidWith self-defined control such as ios.The integration of mobile mobile platform can be greatly improved, each version of exploitation before developerSelf-defined control can be integrated in Mobile solution development platform easily.
Concrete technical scheme is as shown in Figure 1:
(1) first this extension mechanism is integrated in the first item of eclipse, including the configuration, self-defined of control many sets styleThe definition of control, the importing of self-defined control and derivation.
(2) by the configuration information of xml storing multiple sets style, by particular file folder storage self-defined control in multiple shiftingsThe resource file used in dynamic operating system and the program of operation, make attribute extension and the startup item letter of control by oneself by xml storageBreath.
(3) by the zip compression algorithm in java, configuration file and resource information are compressed and mix selected encryptionAlgorithm, this is the process derived.
(4) by decipherment algorithm, compressed package is decompressed, this process being introduced into.
(5) control initialization matter under different styles is solved by the style of xml configuration many sets control.
Finally it is noted that the foregoing is only the preferred embodiments of the present invention, it is not limited to the present invention,Although being described in detail the present invention with reference to previous embodiment, for a person skilled in the art, it still may be usedSo that the technical scheme described in foregoing embodiments to be modified, or wherein portion of techniques feature is carried out equivalent.All within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. made, should be included in the present invention'sWithin protection domain.