Search in sources :

Example 1 with RepoViewCommonNavigator

use of org.talend.repository.navigator.RepoViewCommonNavigator 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 RepoViewCommonNavigator

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

the class TalendWizardArchiveFileResourceExportPage2 method saveDirtyEditors.

@Override
protected boolean saveDirtyEditors() {
    boolean result = false;
    IRepositoryView repView = RepositoryManagerHelper.findRepositoryView();
    if (repView instanceof RepoViewCommonNavigator) {
        ((RepoViewCommonNavigator) repView).setShouldCheckRepositoryDirty(false);
        result = super.saveDirtyEditors();
        ((RepoViewCommonNavigator) repView).setShouldCheckRepositoryDirty(true);
    } else {
        return super.saveDirtyEditors();
    }
    return result;
}
Also used : RepoViewCommonNavigator(org.talend.repository.navigator.RepoViewCommonNavigator) IRepositoryView(org.talend.repository.ui.views.IRepositoryView)

Aggregations

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