1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-09 19:43:27 +02:00

ElfRunner rename to BinaryRunner

This commit is contained in:
Alain Magloire 2002-11-18 15:46:02 +00:00
parent 228076d41b
commit 12958aff89

View file

@ -16,19 +16,19 @@ import org.eclipse.cdt.core.model.IBinary;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICRoot; import org.eclipse.cdt.core.model.ICRoot;
public class ElfRunner implements Runnable { public class BinaryRunner implements Runnable {
ArchiveContainer clib; ArchiveContainer clib;
BinaryContainer cbin; BinaryContainer cbin;
CProject cproject; CProject cproject;
public ElfRunner(CProject cprj) { public BinaryRunner(CProject cprj) {
cproject = cprj; cproject = cprj;
cbin = (BinaryContainer)cprj.getBinaryContainer(); cbin = (BinaryContainer)cprj.getBinaryContainer();
clib = (ArchiveContainer)cprj.getArchiveContainer(); clib = (ArchiveContainer)cprj.getArchiveContainer();
} }
public void run() { public void run() {
cproject.setRunElf(true); cproject.setStartBinaryRunner(true);
clib.removeChildren(); clib.removeChildren();
cbin.removeChildren(); cbin.removeChildren();
try { try {
@ -57,9 +57,9 @@ public class ElfRunner implements Runnable {
} }
} }
void addChildIfElf(CoreModel factory, IFile file) { void addChildIfBinary(CoreModel factory, IFile file) {
// Attempt to speed things up by rejecting up front // Attempt to speed things up by rejecting up front
// Things we know should not be Elf/Binary files. // Things we know should not be Binary files.
if (!factory.isTranslationUnit(file)) { if (!factory.isTranslationUnit(file)) {
if (factory.isBinary(file)) { if (factory.isBinary(file)) {
ICElement celement = factory.create(file); ICElement celement = factory.create(file);
@ -82,15 +82,15 @@ public class ElfRunner implements Runnable {
class Visitor implements IResourceVisitor { class Visitor implements IResourceVisitor {
CoreModel factory = CoreModel.getDefault(); CoreModel factory = CoreModel.getDefault();
ElfRunner runner; BinaryRunner runner;
public Visitor (ElfRunner r) { public Visitor (BinaryRunner r) {
runner = r; runner = r;
} }
public boolean visit(IResource res) throws CoreException { public boolean visit(IResource res) throws CoreException {
if (res instanceof IFile) { if (res instanceof IFile) {
runner.addChildIfElf(factory, (IFile)res); runner.addChildIfBinary(factory, (IFile)res);
return false; return false;
} }
return true; return true;