use of org.talend.repository.ui.wizards.newproject.copyfromeclipse.TalendZipFileExportWizard in project tdi-studio-se by Talend.
the class ExportProjectsAsAction method run.
@Override
public void run() {
// Refresh Navigator view before export operation, see bug 4595
Job job = new //$NON-NLS-1$
Job(//$NON-NLS-1$
Messages.getString("ExportCommandAction.refreshWorkspace")) {
@Override
protected IStatus run(IProgressMonitor monitor) {
monitor.beginTask(ExportProjectsAsAction.this.getToolTipText(), IProgressMonitor.UNKNOWN);
try {
ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
e.printStackTrace();
}
monitor.done();
return Status.OK_STATUS;
}
};
job.setUser(true);
job.setPriority(Job.BUILD);
job.schedule();
initializeExternalLibraries();
Shell activeShell = Display.getCurrent().getActiveShell();
TalendZipFileExportWizard docWizard = new TalendZipFileExportWizard();
WizardDialog dialog = new WizardDialog(activeShell, docWizard);
IBrandingService brandingService = (IBrandingService) GlobalServiceRegister.getDefault().getService(IBrandingService.class);
if (brandingService.isPoweredbyTalend()) {
//$NON-NLS-1$
docWizard.setWindowTitle(Messages.getString("ExportProjectsAsAction.actionTitle"));
} else {
docWizard.setWindowTitle(Messages.getString("ExportProjectsAsAction.actionTitleForOthers", //$NON-NLS-1$
brandingService.getShortProductName()));
}
dialog.create();
dialog.open();
clearExternalLibraries();
}
Aggregations