1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-09 11:33:20 +02:00

applying patch provided by Michael Berger for: defect 141813

This commit is contained in:
David McKnight 2006-05-24 18:51:23 +00:00
parent ca363296e2
commit f2f189dc51
2 changed files with 19 additions and 5 deletions

View file

@ -108,6 +108,8 @@ public class FileClassifier extends Thread
private boolean _classifyChildren = true;
private boolean _classifyFilter = false;
private boolean _canResolveLinks = false;
private boolean _classifyVirtual = false;
@ -160,6 +162,8 @@ public class FileClassifier extends Thread
_classifyVirtual = false;
}
_classifyFilter = objType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR);
// if the subject is a file or a virtual file (i.e. not a directory or
// an archive), then
// we do not classify children (since there are no children)
@ -251,10 +255,19 @@ public class FileClassifier extends Thread
return;
// get full path
String filePath = null;
if (!_classifyFilter)
{
StringBuffer fPathBuf = new StringBuffer(_subject.getValue());
fPathBuf.append(File.separatorChar);
fPathBuf.append(_subject.getName());
String filePath = fPathBuf.toString();
filePath = fPathBuf.toString();
}
else
{
filePath = _subject.getValue();
}
// if we have to classify children
if (_classifyChildren)

View file

@ -797,6 +797,7 @@ public class UniversalFileSystemMiner extends Miner implements
{
createDataElement(_dataStore, subject, list, queryType, filter,inclusion);
String folderProperties = setProperties(fileobj);
if (subject.getSource() == null || subject.getSource().equals(""))
subject.setAttribute(DE.A_SOURCE, folderProperties);
FileClassifier clsfy = getFileClassifier(subject);