Search in sources :

Example 1 with RepoViewCommonViewer

use of org.talend.repository.navigator.RepoViewCommonViewer in project tdi-studio-se by Talend.

the class MetadataGenericContentProvider method addResourceVisitor.

@Override
protected void addResourceVisitor(CommonViewer v) {
    if (v == null) {
        return;
    }
    RepoViewCommonNavigator navigator = null;
    if (v instanceof RepoViewCommonViewer) {
        CommonNavigator commonNavigator = ((RepoViewCommonViewer) v).getCommonNavigator();
        if (commonNavigator instanceof RepoViewCommonNavigator) {
            navigator = ((RepoViewCommonNavigator) commonNavigator);
        }
    }
    if (navigator == null) {
        return;
    }
    if (this.genericNodeVisitor != null) {
        navigator.removeVisitor(this.genericNodeVisitor);
    }
    this.genericNodeVisitor = new GenericNodeDirectChildrenNodeVisitor();
    navigator.addVisitor(this.genericNodeVisitor);
}
Also used : RepoViewCommonNavigator(org.talend.repository.navigator.RepoViewCommonNavigator) CommonNavigator(org.eclipse.ui.navigator.CommonNavigator) RepoViewCommonNavigator(org.talend.repository.navigator.RepoViewCommonNavigator) RepoViewCommonViewer(org.talend.repository.navigator.RepoViewCommonViewer)

Example 2 with RepoViewCommonViewer

use of org.talend.repository.navigator.RepoViewCommonViewer in project tbd-studio-se by Talend.

the class MetadataHadoopClusterContentProvider method addResourceVisitor.

/*
     * (non-Javadoc)
     * 
     * @see
     * org.talend.repository.viewer.content.FolderListenerSingleTopContentProvider#addResourceVisitor(org.eclipse.ui
     * .navigator.CommonViewer)
     */
@Override
protected void addResourceVisitor(CommonViewer v) {
    // super.addResourceVisitor(v);
    if (v == null) {
        return;
    }
    RepoViewCommonNavigator navigator = null;
    if (v instanceof RepoViewCommonViewer) {
        CommonNavigator commonNavigator = ((RepoViewCommonViewer) v).getCommonNavigator();
        if (commonNavigator instanceof RepoViewCommonNavigator) {
            navigator = ((RepoViewCommonNavigator) commonNavigator);
        }
    }
    if (navigator == null) {
        return;
    }
    if (this.testVisitor != null) {
        navigator.removeVisitor(this.testVisitor);
    }
    this.testVisitor = new MetadataHadoopClusterChildrenNodeVisitor();
    navigator.addVisitor(this.testVisitor);
}
Also used : RepoViewCommonNavigator(org.talend.repository.navigator.RepoViewCommonNavigator) CommonNavigator(org.eclipse.ui.navigator.CommonNavigator) RepoViewCommonNavigator(org.talend.repository.navigator.RepoViewCommonNavigator) RepoViewCommonViewer(org.talend.repository.navigator.RepoViewCommonViewer)

Aggregations

CommonNavigator (org.eclipse.ui.navigator.CommonNavigator)2 RepoViewCommonNavigator (org.talend.repository.navigator.RepoViewCommonNavigator)2 RepoViewCommonViewer (org.talend.repository.navigator.RepoViewCommonViewer)2