use of org.talend.dq.nodes.JrxmlTempleteRepNode in project tdq-studio-se by Talend.
the class DQDeleteAction method checkSourceFilesEditorOpening.
/**
* DOC xqliu Comment method "checkSourceFilesEditorOpening".
*
* @param deleteElements
* @return
*/
@SuppressWarnings({ "hiding", "rawtypes", "unchecked" })
private Object[] checkSourceFilesEditorOpening(Object[] deleteElements) {
List list = new ArrayList();
boolean opened = false;
// $NON-NLS-1$
String openSourceFileNames = "";
for (Object obj : deleteElements) {
if (obj instanceof SourceFileRepNode || obj instanceof JrxmlTempleteRepNode) {
ReturnCode rc = WorkspaceResourceHelper.checkSourceFileNodeOpening((RepositoryNode) obj);
if (rc.isOk()) {
opened = rc.isOk();
openSourceFileNames += rc.getMessage();
} else {
list.add(obj);
}
} else if (obj instanceof SourceFileSubFolderNode || obj instanceof JrxmlTempSubFolderNode) {
ReturnCode rc = WorkspaceResourceHelper.checkSourceFileSubFolderNodeOpening((RepositoryNode) obj);
if (rc.isOk()) {
opened = rc.isOk();
openSourceFileNames += rc.getMessage();
} else {
list.add(obj);
}
} else {
list.add(obj);
}
}
if (opened) {
WorkspaceResourceHelper.showSourceFilesOpeningWarnMessages(openSourceFileNames);
}
return list.toArray();
}
Aggregations