1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-30 20:35:38 +02:00

Cache the source file list for an executable and don't block the UI while getting it.

This commit is contained in:
Ken Ryall 2008-06-28 12:01:59 +00:00
parent 50b3346cec
commit 0387684e7d

View file

@ -15,6 +15,7 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.debug.core.executables.Executable;
import org.eclipse.cdt.ui.CElementContentProvider;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
public class SourceFilesContentProvider extends CElementContentProvider {
@ -35,7 +36,7 @@ public class SourceFilesContentProvider extends CElementContentProvider {
public Object[] getElements(Object inputElement) {
if (inputElement instanceof Executable) {
Executable executable = (Executable) inputElement;
ITranslationUnit[] sourceFiles = executable.getSourceFiles();
ITranslationUnit[] sourceFiles = executable.getSourceFiles(new NullProgressMonitor());
if (sourceFiles.length == 0)
return new String[] { Messages.SourceFilesContentProvider_NoFilesFound + executable.getName() };
else