mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 09:45:39 +02:00
2004-09-21 Alain Magloire
* model/org/eclipse/cdt/core/model/IBinary.java * model/org/eclipse/cdt/internal/core/model/Archive.java * model/org/eclipse/cdt/internal/core/model/Binary.java
This commit is contained in:
parent
24cdf54262
commit
e8cab177d9
4 changed files with 25 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-09-21 Alain Magloire
|
||||||
|
* model/org/eclipse/cdt/core/model/IBinary.java
|
||||||
|
* model/org/eclipse/cdt/internal/core/model/Archive.java
|
||||||
|
* model/org/eclipse/cdt/internal/core/model/Binary.java
|
||||||
|
|
||||||
2004-09-21 David Inglis
|
2004-09-21 David Inglis
|
||||||
|
|
||||||
Lots of changes to the binary parsers
|
Lots of changes to the binary parsers
|
||||||
|
|
|
@ -10,8 +10,6 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.core.model;
|
package org.eclipse.cdt.core.model;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.IAddressFactory;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a Binary file, for example an ELF excutable.
|
* Represents a Binary file, for example an ELF excutable.
|
||||||
|
@ -45,6 +43,6 @@ public interface IBinary extends ICElement, IParent, IOpenable {
|
||||||
|
|
||||||
public boolean isLittleEndian();
|
public boolean isLittleEndian();
|
||||||
|
|
||||||
public IAddressFactory getAddressFactory();
|
//public IAddressFactory getAddressFactory();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,16 @@ public class Archive extends Openable implements IArchive {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
||||||
|
*/
|
||||||
|
public Object getAdapter(Class adapter) {
|
||||||
|
if (IBinaryArchive.class.equals(adapter)) {
|
||||||
|
return getBinaryArchive();
|
||||||
|
}
|
||||||
|
return super.getAdapter(adapter);
|
||||||
|
}
|
||||||
|
|
||||||
IBinaryArchive getBinaryArchive() {
|
IBinaryArchive getBinaryArchive() {
|
||||||
return binaryArchive;
|
return binaryArchive;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import java.io.InputStreamReader;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.IAddressFactory;
|
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryExecutable;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryFile;
|
||||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
|
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
|
||||||
|
@ -44,7 +43,6 @@ public class Binary extends Openable implements IBinary {
|
||||||
private long longBSS;
|
private long longBSS;
|
||||||
private String endian;
|
private String endian;
|
||||||
private String soname;
|
private String soname;
|
||||||
private IAddressFactory addressFactory;
|
|
||||||
|
|
||||||
private long fLastModification;
|
private long fLastModification;
|
||||||
|
|
||||||
|
@ -173,16 +171,17 @@ public class Binary extends Openable implements IBinary {
|
||||||
protected IBinaryObject getBinaryObject() {
|
protected IBinaryObject getBinaryObject() {
|
||||||
return binaryObject;
|
return binaryObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IAddressFactory getAddressFactory() {
|
/* (non-Javadoc)
|
||||||
if (isObject() || isExecutable() || isSharedLib() || isCore()) {
|
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
||||||
if (addressFactory == null || hasChanged()) {
|
*/
|
||||||
addressFactory = getBinaryObject().getAddressFactory();
|
public Object getAdapter(Class adapter) {
|
||||||
}
|
if (IBinaryObject.class.equals(adapter)) {
|
||||||
|
return getBinaryObject();
|
||||||
}
|
}
|
||||||
return addressFactory;
|
return super.getAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getType() {
|
protected int getType() {
|
||||||
IBinaryObject obj = getBinaryObject();
|
IBinaryObject obj = getBinaryObject();
|
||||||
if (obj != null && (fBinType == 0 || hasChanged())) {
|
if (obj != null && (fBinType == 0 || hasChanged())) {
|
||||||
|
@ -204,7 +203,6 @@ public class Binary extends Openable implements IBinary {
|
||||||
longData = -1;
|
longData = -1;
|
||||||
longText = -1;
|
longText = -1;
|
||||||
soname = null;
|
soname = null;
|
||||||
addressFactory = null;
|
|
||||||
}
|
}
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue