use of org.talend.camel.designer.ui.editor.dependencies.dialog.NewOrEditDependencyDialog in project tesb-studio-se by Talend.
the class CamelDependenciesPanel method editSelected.
private void editSelected() {
final ManifestItem selected = (ManifestItem) ((IStructuredSelection) tableViewer.getSelection()).getFirstElement();
final NewOrEditDependencyDialog dialog = new NewOrEditDependencyDialog(getInput(), selected, getShell(), type);
if (dialog.open() == Dialog.OK) {
ManifestItem item = dialog.getManifestItem();
selected.setName(item.getName());
selected.setOptional(item.isOptional());
selected.setVersion(item.getVersion());
tableViewer.update(selected, null);
fireDependenciesChangedListener();
}
}
use of org.talend.camel.designer.ui.editor.dependencies.dialog.NewOrEditDependencyDialog in project tesb-studio-se by Talend.
the class CamelDependenciesPanel method addNewItem.
private void addNewItem() {
final Collection<ManifestItem> input = (Collection<ManifestItem>) getInput();
NewOrEditDependencyDialog dialog = new NewOrEditDependencyDialog(input, getShell(), type);
if (dialog.open() == Dialog.OK) {
final ManifestItem addedItem = dialog.getManifestItem();
input.add(addedItem);
tableViewer.refresh();
tableViewer.setSelection(new StructuredSelection(addedItem));
tableViewer.getTable().showSelection();
tableViewer.getTable().setFocus();
fireDependenciesChangedListener();
}
}
Aggregations