use of org.talend.designer.maven.aether.DummyDynamicMonitor in project tbd-studio-se by Talend.
the class DynamicDistributionPreferenceForm method onDeleteBtnPressed.
private void onDeleteBtnPressed() {
IStructuredSelection selection = (IStructuredSelection) versionCombo.getSelection();
final IDynamicPlugin dynamicPlugin = (IDynamicPlugin) selection.getFirstElement();
boolean agree = MessageDialog.openConfirm(getShell(), // $NON-NLS-1$
Messages.getString("DynamicDistributionPreferenceForm.form.deleteExistingConfig.confirm.dialog.title"), // $NON-NLS-1$
Messages.getString(// $NON-NLS-1$
"DynamicDistributionPreferenceForm.form.deleteExistingConfig.confirm.dialog.message", dynamicPlugin.getPluginConfiguration().getName()));
if (agree) {
try {
doDelete(dynamicPlugin);
IDynamicMonitor monitor = new DummyDynamicMonitor();
refreshVersionList(monitor);
} catch (Throwable e) {
ExceptionHandler.process(e);
String message = e.getMessage();
if (StringUtils.isEmpty(message)) {
// $NON-NLS-1$
message = Messages.getString("ExceptionDialog.message.empty");
}
// $NON-NLS-1$
ExceptionMessageDialog.openError(getShell(), Messages.getString("ExceptionDialog.title"), message, e);
}
}
}
use of org.talend.designer.maven.aether.DummyDynamicMonitor in project tbd-studio-se by Talend.
the class DynamicDistributionOptionForm method getNamePluginMap.
private Map<String, IDynamicPlugin> getNamePluginMap() throws Exception {
if (namePluginMap == null || namePluginMap.isEmpty()) {
namePluginMap = new HashMap<>();
DynamicDistributionSetupData dynamicBuildConfigurationData = getDynamicDistributionSetupData();
if (allBuiltinDynamicPlugins == null || allBuiltinDynamicPlugins.isEmpty()) {
copyAllUsersDynamicPlugins(new DummyDynamicMonitor(), dynamicBuildConfigurationData.getDynamicDistributionsGroup());
}
if (allBuiltinDynamicPlugins != null) {
for (IDynamicPlugin plugin : allBuiltinDynamicPlugins) {
IDynamicPluginConfiguration pluginConfiguration = plugin.getPluginConfiguration();
String name = pluginConfiguration.getName();
namePluginMap.put(name, plugin);
}
}
if (allCurrentUsersDynamicPlugins != null) {
for (IDynamicPlugin plugin : allCurrentUsersDynamicPlugins) {
IDynamicPluginConfiguration pluginConfiguration = plugin.getPluginConfiguration();
String name = pluginConfiguration.getName();
namePluginMap.put(name, plugin);
}
}
}
return namePluginMap;
}
use of org.talend.designer.maven.aether.DummyDynamicMonitor in project tbd-studio-se by Talend.
the class DynamicDistributionOptionPage method createControl.
@Override
public void createControl(Composite parent) {
IDynamicMonitor monitor = new DummyDynamicMonitor();
AbstractDynamicDistributionForm.ICheckListener checkListener = new ICheckListener() {
@Override
public void showMessage(String message, int level) {
setMessage(message, level);
}
@Override
public void updateButtons() {
getContainer().updateButtons();
}
@Override
public String getMessage() {
return DynamicDistributionOptionPage.this.getMessage();
}
@Override
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws Exception {
getContainer().run(fork, cancelable, runnable);
}
};
AbstractDynamicDistributionForm setupForm = new DynamicDistributionOptionForm(parent, SWT.NONE, getDynamicBuildConfigurationData(), monitor);
setupForm.setCheckListener(checkListener);
setControl(setupForm);
setCurrentForm(setupForm);
setPageComplete(false);
}
Aggregations