use of org.talend.camel.designer.dialog.RouteResourceSelectionDialog in project tesb-studio-se by Talend.
the class RouteResourceController method createButtonCommand.
/**
*
* @param source
* @return
*/
private PropertyChangeCommand createButtonCommand(Button button) {
RouteResourceSelectionDialog dialog = new RouteResourceSelectionDialog(button.getShell());
selectNodeIfExists(button, dialog);
if (dialog.open() == Window.OK) {
IRepositoryViewObject repositoryObject = dialog.getResult().getObject();
// refreshItemeProperty(repositoryObject);
final Item item = repositoryObject.getProperty().getItem();
String id = item.getProperty().getId();
String paramName = (String) button.getData(PARAMETER_NAME);
return new PropertyChangeCommand(elem, paramName, id);
}
return null;
}
use of org.talend.camel.designer.dialog.RouteResourceSelectionDialog in project tesb-studio-se by Talend.
the class ManageRouteResourcePanel method addData.
protected void addData() {
RouteResourceSelectionDialog dialog = new RouteResourceSelectionDialog(getShell());
if (Dialog.OK == dialog.open()) {
Item item = dialog.getResult().getObject().getProperty().getItem();
if (item instanceof RouteResourceItem) {
for (ResourceDependencyModel rsmodel : getInput()) {
if (rsmodel.getItem().getProperty().getId().equals(item.getProperty().getId())) {
resourcesTV.setSelection(new StructuredSelection(rsmodel));
return;
}
}
ResourceDependencyModel model = new ResourceDependencyModel((RouteResourceItem) item);
getInput().add(model);
resourcesTV.refresh();
resourcesTV.setSelection(new StructuredSelection(model));
fireDependenciesChangedListener();
}
}
}
Aggregations