use of org.talend.dq.nodes.UserDefIndicatorSubFolderRepNode in project tdq-studio-se by Talend.
the class DeleteResourceProvider method shouldShowRenameFolderMenu.
private boolean shouldShowRenameFolderMenu(RepositoryNode node) {
boolean show = false;
if (node instanceof AnalysisSubFolderRepNode) {
AnalysisSubFolderRepNode anaSubFolderNode = (AnalysisSubFolderRepNode) node;
show = !anaSubFolderNode.isVirtualFolder();
} else if (node instanceof ReportSubFolderRepNode) {
ReportSubFolderRepNode repSubFolderNode = (ReportSubFolderRepNode) node;
show = !repSubFolderNode.isVirtualFolder();
} else if (node instanceof UserDefIndicatorSubFolderRepNode || node instanceof PatternRegexSubFolderRepNode || node instanceof PatternSqlSubFolderRepNode || node instanceof RulesSQLSubFolderRepNode || node instanceof RulesParserSubFolderRepNode || node instanceof DBConnectionSubFolderRepNode || node instanceof DFConnectionSubFolderRepNode || node instanceof JrxmlTempSubFolderNode) {
show = true;
}
return show;
}
use of org.talend.dq.nodes.UserDefIndicatorSubFolderRepNode in project tdq-studio-se by Talend.
the class FolderObjFilter method select.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object,
* java.lang.Object)
*/
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
if (element instanceof IResource) {
IResource res = (IResource) element;
if (IResource.FOLDER == res.getType()) {
IFolder folder = (IFolder) element;
// MOD mzhao 2010-08-12 14891: use same repository API with TOS to persistent metadata
if (folder.getProjectRelativePath().toString().startsWith(EResourceConstant.METADATA.getPath())) {
String folderName = folder.getName();
if (folderName.equals("bin")) {
// $NON-NLS-1$
return false;
}
if (folderName.equals(EResourceConstant.METADATA.getPath())) {
return true;
} else if (ResourceManager.getConnectionFolder().getFullPath().isPrefixOf(folder.getFullPath())) {
return true;
}
return false;
} else // MOD zshen 2011-1-16 18724: Java UDI enhancements to hide lib folder.
if (folder.getProjectRelativePath().toString().startsWith(EResourceConstant.USER_DEFINED_INDICATORS.getPath()) && (folder.getName().equals("lib"))) {
// $NON-NLS-1$
return false;
}
// ~18724
ResourceAttributes resourceAttributes = folder.getResourceAttributes();
if (resourceAttributes == null) {
return true;
}
if (resourceAttributes.isHidden()) {
return false;
}
} else {
return true;
}
} else if (element instanceof UserDefIndicatorSubFolderRepNode) {
if (EResourceConstant.USER_DEFINED_INDICATORS_LIB.getName().equalsIgnoreCase(((UserDefIndicatorSubFolderRepNode) element).getObject().getLabel())) {
return false;
}
}
return true;
}
Aggregations