use of org.talend.repository.ui.dialog.RepositoryReviewDialog in project tesb-studio-se by Talend.
the class ServicesButtonPart method buttonSelected.
@Override
protected void buttonSelected(SelectionEvent e) {
RepositoryReviewDialog dialog = new RepositoryReviewDialog(getShell(), ERepositoryObjectType.METADATA, "SERVICES:OPERATION") {
@Override
protected boolean isSelectionValid(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
if (selection.size() == 1) {
return true;
}
return false;
}
@Override
protected Control createDialogArea(Composite parent) {
return createDialogArea(parent, "org.talend.rcp.perspective");
}
};
int open = dialog.open();
if (open == Dialog.OK) {
RepositoryNode result = dialog.getResult();
if (result != null) {
listener.serviceNodeSelected(result);
}
}
}
Aggregations