use of org.talend.repository.ui.actions.ImportProjectSettings in project tdi-studio-se by Talend.
the class ProjectSettingsPreferenceDialog method importPressed.
private void importPressed() {
FileDialog fileDialog = new FileDialog(getShell(), SWT.OPEN);
//$NON-NLS-1$
String[] files = new String[] { "*.xml" };
fileDialog.setFilterExtensions(files);
String path = fileDialog.open();
ImportProjectSettings settings = new ImportProjectSettings(path);
boolean error = false;
ExportProjectSettings original = new ExportProjectSettings(TEMP_PRODUCT_SETTING_XML);
original.saveProjectSettings();
try {
settings.updateProjectSettings();
} catch (Exception e) {
error = true;
showErrorMessage();
}
// close the projec settings and open it again to get new settings
if (!error) {
close();
ProjectSettingDialog dialog = new ProjectSettingDialog();
dialog.open();
}
}
Aggregations