Search in sources :

Example 16 with DQRespositoryView

use of org.talend.dataprofiler.core.ui.views.DQRespositoryView in project tdq-studio-se by Talend.

the class DQDeleteAction method getSelection.

@Override
public ISelection getSelection() {
    ISelection selection = null;
    if (currentNode == null) {
        if (deleteElements != null) {
            selection = super.getSelection();
        } else {
            // select by UI(tree)
            DQRespositoryView findView = CorePlugin.getDefault().getRepositoryView();
            selection = findView.getCommonViewer().getSelection();
        }
    } else {
        // new instance of selection for dependency modeleEelemnt.
        selection = new StructuredSelection(currentNode);
    }
    return selection;
}
Also used : ISelection(org.eclipse.jface.viewers.ISelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) DQRespositoryView(org.talend.dataprofiler.core.ui.views.DQRespositoryView)

Example 17 with DQRespositoryView

use of org.talend.dataprofiler.core.ui.views.DQRespositoryView in project tdq-studio-se by Talend.

the class DQEmptyRecycleBinAction method getSelection.

@Override
public ISelection getSelection() {
    DQRespositoryView findView = CorePlugin.getDefault().getRepositoryView();
    ISelection selection = findView.getCommonViewer().getSelection();
    return selection;
}
Also used : ISelection(org.eclipse.jface.viewers.ISelection) DQRespositoryView(org.talend.dataprofiler.core.ui.views.DQRespositoryView)

Example 18 with DQRespositoryView

use of org.talend.dataprofiler.core.ui.views.DQRespositoryView in project tdq-studio-se by Talend.

the class DQEditContextAction method getSelection.

@Override
public ISelection getSelection() {
    ISelection selection;
    if (node == null) {
        // select by UI(tree)
        DQRespositoryView findView = CorePlugin.getDefault().getRepositoryView();
        selection = findView.getCommonViewer().getSelection();
    } else {
        // new instance of selection for dependency modeleEelemnt.
        selection = new StructuredSelection(node);
    }
    return selection;
}
Also used : ISelection(org.eclipse.jface.viewers.ISelection) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) DQRespositoryView(org.talend.dataprofiler.core.ui.views.DQRespositoryView)

Example 19 with DQRespositoryView

use of org.talend.dataprofiler.core.ui.views.DQRespositoryView in project tdq-studio-se by Talend.

the class DQRestoreAction method getSelection.

@Override
public ISelection getSelection() {
    DQRespositoryView findView = CorePlugin.getDefault().getRepositoryView();
    ISelection selection = findView.getCommonViewer().getSelection();
    return selection;
}
Also used : ISelection(org.eclipse.jface.viewers.ISelection) DQRespositoryView(org.talend.dataprofiler.core.ui.views.DQRespositoryView)

Aggregations

DQRespositoryView (org.talend.dataprofiler.core.ui.views.DQRespositoryView)19 IRepositoryNode (org.talend.repository.model.IRepositoryNode)9 TreeItem (org.eclipse.swt.widgets.TreeItem)6 ISelection (org.eclipse.jface.viewers.ISelection)5 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)5 RepositoryNode (org.talend.repository.model.RepositoryNode)4 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)3 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)3 RespositoryDetailView (org.talend.dataprofiler.core.ui.views.RespositoryDetailView)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 IFolder (org.eclipse.core.resources.IFolder)2 CoreException (org.eclipse.core.runtime.CoreException)2 TableItem (org.eclipse.swt.widgets.TableItem)2 PartInitException (org.eclipse.ui.PartInitException)2 ModelElement (orgomg.cwm.objectmodel.core.ModelElement)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 HashMap (java.util.HashMap)1 IFile (org.eclipse.core.resources.IFile)1 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)1