use of org.talend.dataprofiler.core.ui.imex.ImportFromExchangeWizard in project tdq-studio-se by Talend.
the class ImportFactory method importFromExchange.
/**
* DOC xqliu Comment method "importFromExchange".
*
* @param componet
* @return
*/
public static void importFromExchange(IEcosComponent componet) throws Exception {
File file = new File(componet.getInstalledLocation());
File copiedFile = new File(// $NON-NLS-1$
System.getProperty("java.io.tmpdir") + File.separator + new Path(componet.getInstalledLocation()).lastSegment());
// copy the downloaded file out of the workspace
org.apache.commons.io.FileUtils.copyFile(file, copiedFile);
Wizard wizard = new ImportFromExchangeWizard(copiedFile.getAbsolutePath());
WizardDialog dialog = new WizardDialog(null, wizard);
if (WizardDialog.OK == dialog.open()) {
ResourceManager.getLibrariesFolder().refreshLocal(IResource.DEPTH_INFINITE, null);
}
}
Aggregations