mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-09 11:33:20 +02:00
ElfRunner rename to BinaryRunner
This commit is contained in:
parent
228076d41b
commit
12958aff89
1 changed files with 8 additions and 8 deletions
|
@ -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;
|
Loading…
Add table
Reference in a new issue