Home

Awesome

Attention. This project is not maintained any more !!!

VirtualView Tools

中文文档

This project is a tool library as a part of VirtualView library, used to compile XML files:

How-to

Run From CMD

Tools Introduction

Download the source code, the executable is located at folder TemplateWorkSpace. There are several files here:

FileIntroduction
config.propertiesconfigs of widget's ID and attribute's value type
templatelist.propertiesthe file list of XML template
buildoutput folder after compiling XML files
templatethe source code XML files
compiler.jarexecutable jar file exported from the total source code
buildTemplate.shthe command script to run compiler.jar
How to Run
How to Configure config.properties
How to Configure templatelist.properties
How to Write XML
Artifacts after Compiling

Use as API

Except that use as a command tool to compile file, there is an another way to compile XML data from an IDE plugin, a client, a backend service or somewhere else. So it's possible to use JAVA API to compile data, the example code is as follow:

//Build a ViewCompilerApi instance
ViewCompilerApi viewCompiler = new ViewCompilerApi();
//init a ConfigLoader to load config.properties.
viewCompiler.setConfigLoader(new LocalConfigLoader());
//read XML data from file or somewhere else
FileInputStream fis = new FileInputStream(rootDir);
//Parameters are XML data's InputStream, template name, template version
byte[] result = viewCompiler.compile(fis, "icon", 13);

Contributing

Before you open an issue or create a pull request, please read Contributing Guide first.

LICENSE

VirtualView tools is available under the MIT license.