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:
parent
ca363296e2
commit
f2f189dc51
2 changed files with 19 additions and 5 deletions
|
@ -107,6 +107,8 @@ public class FileClassifier extends Thread
|
||||||
private List _fileMap;
|
private List _fileMap;
|
||||||
|
|
||||||
private boolean _classifyChildren = true;
|
private boolean _classifyChildren = true;
|
||||||
|
|
||||||
|
private boolean _classifyFilter = false;
|
||||||
|
|
||||||
private boolean _canResolveLinks = false;
|
private boolean _canResolveLinks = false;
|
||||||
|
|
||||||
|
@ -159,6 +161,8 @@ public class FileClassifier extends Thread
|
||||||
{
|
{
|
||||||
_classifyVirtual = false;
|
_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
|
// if the subject is a file or a virtual file (i.e. not a directory or
|
||||||
// an archive), then
|
// an archive), then
|
||||||
|
@ -251,10 +255,19 @@ public class FileClassifier extends Thread
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get full path
|
// get full path
|
||||||
StringBuffer fPathBuf = new StringBuffer(_subject.getValue());
|
String filePath = null;
|
||||||
fPathBuf.append(File.separatorChar);
|
if (!_classifyFilter)
|
||||||
fPathBuf.append(_subject.getName());
|
{
|
||||||
String filePath = fPathBuf.toString();
|
StringBuffer fPathBuf = new StringBuffer(_subject.getValue());
|
||||||
|
fPathBuf.append(File.separatorChar);
|
||||||
|
fPathBuf.append(_subject.getName());
|
||||||
|
filePath = fPathBuf.toString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filePath = _subject.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// if we have to classify children
|
// if we have to classify children
|
||||||
if (_classifyChildren)
|
if (_classifyChildren)
|
||||||
|
|
|
@ -797,7 +797,8 @@ public class UniversalFileSystemMiner extends Miner implements
|
||||||
{
|
{
|
||||||
createDataElement(_dataStore, subject, list, queryType, filter,inclusion);
|
createDataElement(_dataStore, subject, list, queryType, filter,inclusion);
|
||||||
String folderProperties = setProperties(fileobj);
|
String folderProperties = setProperties(fileobj);
|
||||||
subject.setAttribute(DE.A_SOURCE, folderProperties);
|
if (subject.getSource() == null || subject.getSource().equals(""))
|
||||||
|
subject.setAttribute(DE.A_SOURCE, folderProperties);
|
||||||
|
|
||||||
FileClassifier clsfy = getFileClassifier(subject);
|
FileClassifier clsfy = getFileClassifier(subject);
|
||||||
clsfy.start();
|
clsfy.start();
|
||||||
|
|
Loading…
Add table
Reference in a new issue