[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Applied: CDT_1_1: PR 36920. 36919
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/ChangeLog,v
retrieving revision 1.89
diff -u -r1.89 ChangeLog
--- ChangeLog 17 Apr 2003 12:59:33 -0000 1.89
+++ ChangeLog 29 Apr 2003 19:38:48 -0000
@@ -1,3 +1,15 @@
+2003-04-29 Alain Magloire
+
+ PR 36920
+ PR 36919
+
+ * model/org/eclipse/cdt/internal/core/model/Binary.java (isReadOnly):
+ Always return true for binaries.
+ * model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java (getBinary):
+ Catch path being null.
+ * model/org/eclipse/cdt/internal/core/model/parser/PEParser.java (getBinary):
+ Catch path being null.
+
2003-04-12 Alain Magloire
Bug 36624
Index: model/org/eclipse/cdt/internal/core/model/Binary.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java,v
retrieving revision 1.7
diff -u -r1.7 Binary.java
--- model/org/eclipse/cdt/internal/core/model/Binary.java 2 Apr 2003 04:52:40 -0000 1.7
+++ model/org/eclipse/cdt/internal/core/model/Binary.java 29 Apr 2003 19:38:48 -0000
@@ -36,7 +36,6 @@
binaryFile = bin;
}
-
public boolean isSharedLib() {
if (binaryFile != null) {
return binaryFile.getType() == IBinaryObject.SHARED;
@@ -80,7 +79,7 @@
}
public String[] getNeededSharedLibs() {
- if (isExecutable()) {
+ if (isExecutable() || isSharedLib()) {
return ((IBinaryExecutable)binaryFile).getNeededSharedLibs();
}
return new String[0];
@@ -119,6 +118,13 @@
return ((IBinaryObject)binaryFile).isLittleEndian();
}
return false;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.model.ICElement#isReadOnly()
+ */
+ public boolean isReadOnly() {
+ return true;
}
public CElementInfo createElementInfo() {
Index: model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java,v
retrieving revision 1.5
diff -u -r1.5 ElfParser.java
--- model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java 28 Feb 2003 21:29:37 -0000 1.5
+++ model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java 29 Apr 2003 19:38:48 -0000
@@ -12,6 +12,7 @@
import org.eclipse.cdt.utils.elf.AR;
import org.eclipse.cdt.utils.elf.Elf;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
/**
*/
@@ -21,6 +22,9 @@
* @see org.eclipse.cdt.core.model.IBinaryParser#getBinary(IPath)
*/
public IBinaryFile getBinary(IPath path) throws IOException {
+ if (path == null ) {
+ path = new Path("");
+ }
try {
Elf e = new Elf(path.toOSString());
e.dispose();
Index: model/org/eclipse/cdt/internal/core/model/parser/PEParser.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/PEParser.java,v
retrieving revision 1.4
diff -u -r1.4 PEParser.java
--- model/org/eclipse/cdt/internal/core/model/parser/PEParser.java 28 Feb 2003 21:29:38 -0000 1.4
+++ model/org/eclipse/cdt/internal/core/model/parser/PEParser.java 29 Apr 2003 19:38:48 -0000
@@ -12,6 +12,7 @@
import org.eclipse.cdt.utils.coff.PE;
import org.eclipse.cdt.utils.coff.PEArchive;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
/**
*/
@@ -21,6 +22,9 @@
* @see org.eclipse.cdt.core.model.IBinaryParser#getBinary(IFile)
*/
public IBinaryFile getBinary(IPath path) throws IOException {
+ if (path == null) {
+ path = new Path("");
+ }
try {
PE pe = new PE(path.toOSString());
pe.dispose();