VisuaLage ExportData exported project, package

zhaozj2021-02-08  223

// Import com.ibm.ivj.util.base. *;

Workspace Workspace = NULL;

Try {

// Connect to the workspace

Workspace = Toolenv.connectToWorkSpace ();

// Create a list of packages to export

Package [] packages = new package [2];

Packages [0] = Workspace.loadedPackageNamed ("EffectiveVaj.gencode);

Packages [1] = Workspace.loadedPackageNamed ("EffectiveVaj.Vce.Factory);

// or create a list of project to export

// project [] allprojects = workspace.getProjects ();

// set up the export specification

ExportCodespec exportData = new exportcodespec ();

ExportData.includeClass (false);

ExportData.includejava (TRUE);

ExportData.includeResources (TRUE);

ExportData.OverWriteFiles (TRUE);

ExportData.SetPackages (packages);

// ExportData.SetProjects (allProjects);

// Export Use Sub Directory

ExportData.useSubdirectories (TRUE);

ExportData.seTexportDirectory ("C: // TMP");

// perform the export

Workspace.exportData (ExportData);

}

// if We Had An Export Problem, List the Errors

Catch (IvjexPortexception E) {

String [] Errors = E.GeterrorS ();

Workspace.logMessage ("/ NERRORS DURING EXPORT! / N", TRUE);

For (int i = 0; i

Workspace.LogMessage (Errors [i] "/ n", true);

}

转载请注明原文地址:https://www.9cbs.com/read-3242.html

New Post(0)