Search in sources :

Example 11 with RepositoryReviewDialog

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);
        }
    }
}
Also used : Composite(org.eclipse.swt.widgets.Composite) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) RepositoryNode(org.talend.repository.model.RepositoryNode) RepositoryReviewDialog(org.talend.repository.ui.dialog.RepositoryReviewDialog)

Aggregations

RepositoryReviewDialog (org.talend.repository.ui.dialog.RepositoryReviewDialog)11 RepositoryNode (org.talend.repository.model.RepositoryNode)9 IElementParameter (org.talend.core.model.process.IElementParameter)7 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)7 ConnectionItem (org.talend.core.model.properties.ConnectionItem)6 Item (org.talend.core.model.properties.Item)6 PropertyChangeCommand (org.talend.designer.core.ui.editor.cmd.PropertyChangeCommand)6 ERepositoryObjectType (org.talend.core.model.repository.ERepositoryObjectType)5 Command (org.eclipse.gef.commands.Command)4 CompoundCommand (org.eclipse.gef.commands.CompoundCommand)4 INode (org.talend.core.model.process.INode)4 Node (org.talend.designer.core.ui.editor.nodes.Node)4 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 List (java.util.List)3 Map (java.util.Map)3 Point (org.eclipse.swt.graphics.Point)3 Button (org.eclipse.swt.widgets.Button)3 IMetadataColumn (org.talend.core.model.metadata.IMetadataColumn)3 IMetadataTable (org.talend.core.model.metadata.IMetadataTable)3