use of org.talend.repository.model.nodes.IProjectRepositoryNode in project tdi-studio-se by Talend.
the class AbstractVersionManagementProjectSettingPage method addRepositoryTreeViewer.
/**
* repository tree viewer.
*/
private void addRepositoryTreeViewer(Composite leftComposite) {
GridData gridData = new GridData(GridData.FILL_BOTH);
gridData.widthHint = 210;
gridData.heightHint = 400;
leftComposite.setLayoutData(gridData);
RepoCommonViewerProvider provider = RepoCommonViewerProvider.CHECKBOX;
treeViewer = (CheckboxRepositoryTreeViewer) provider.createViewer(leftComposite);
IProjectRepositoryNode projectRepositoryNode = provider.getProjectRepositoryNode();
processItems(versionObjects, (RepositoryNode) projectRepositoryNode);
addMenuAction(treeViewer.getTree());
// filter
treeViewer.addFilter(new ViewerFilter() {
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
RepositoryNode node = (RepositoryNode) element;
return filterRepositoryNode(node);
}
});
// event
treeViewer.addCheckStateListener(checkStateListener);
treeViewer.addTreeListener(new ITreeViewerListener() {
@Override
public void treeCollapsed(TreeExpansionEvent event) {
//
}
@Override
public void treeExpanded(TreeExpansionEvent event) {
// refreshCheckedTreeView();
}
});
expandSomeNodes(projectRepositoryNode);
}
Aggregations