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);
}
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);
}
Aggregations