diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog
index 7722ba4b1d0..0bac687fea5 100644
--- a/core/org.eclipse.cdt.core/ChangeLog
+++ b/core/org.eclipse.cdt.core/ChangeLog
@@ -3,6 +3,25 @@
Added the ability for CView to update based on the translation unit working copy
if one exists.
+2004-02-27 Alain Magloire
+
+ By "popular" demand, put back
+ IBinaryParser.getBinary(IPath path)
+ method on the binary parser.
+
+ * model/org/eclpse/cdt/internal/core/model/CProject.java
+ * model/org/eclpse/cdt/internal/core/model/NullBinaryParser.java
+ * src/org/eclipse/cdt/core/IBinaryParser.java
+ * utils/org/eclipse/cdt/utils/coff/parser/PEParser.java
+ * utils/org/eclipse/cdt/utils/elf/parser/ElfParser.java
+
+ Removed the unused ElfParsers id.
+
+ * model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java
+ * model/org/eclipse/cdt/internal/core/model/parser/PEParser.java
+
+ * plugin.xml
+
2004-02-27 Alain Magloire
Performance improvement in the IBinaryParser and
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
index 4d6fa49789a..4ac3c8260af 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CProject.java
@@ -121,7 +121,7 @@ public class CProject extends CContainer implements ICProject {
if (binParser != null) {
IBinaryFile bin;
try {
- bin = binParser.getBinary(null, entry.getPath());
+ bin = binParser.getBinary(entry.getPath());
if (bin.getType() == IBinaryFile.ARCHIVE) {
lib = new LibraryReferenceArchive(cproject, entry, (IBinaryArchive)bin);
} else {
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/NullBinaryParser.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/NullBinaryParser.java
index 379365b6bf7..7dc59ff95ce 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/NullBinaryParser.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/NullBinaryParser.java
@@ -6,6 +6,7 @@ package org.eclipse.cdt.internal.core.model;
*/
import java.io.IOException;
+
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IBinaryParser;
import org.eclipse.core.runtime.IPath;
@@ -21,6 +22,13 @@ public class NullBinaryParser implements IBinaryParser {
throw new IOException(CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Not_binary_file")); //$NON-NLS-1$
}
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.IBinaryParser#getBinary(org.eclipse.core.runtime.IPath)
+ */
+ public IBinaryFile getBinary(IPath path) throws IOException {
+ throw new IOException(CCorePlugin.getResourceString("CoreModel.NullBinaryParser.Not_binary_file")); //$NON-NLS-1$
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.core.IBinaryParser#getFormat()
*/
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java
deleted file mode 100644
index 883102ff323..00000000000
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/ElfParser.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2002,2003 QNX Software Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Common Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/cpl-v10.html
- *
- * Contributors:
- * QNX Software Systems - Initial API and implementation
-***********************************************************************/
-
-package org.eclipse.cdt.internal.core.model.parser;
-
-/**
- * Implementation moved to org.eclipse.cdt.utils.elf.parser.ElfParser
- * But this class is still provided for backward compatibility.
- */
-public class ElfParser extends org.eclipse.cdt.utils.elf.parser.ElfParser {
-}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/PEParser.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/PEParser.java
deleted file mode 100644
index 0b092507350..00000000000
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/parser/PEParser.java
+++ /dev/null
@@ -1,14 +0,0 @@
-package org.eclipse.cdt.internal.core.model.parser;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-
-/**
- * Implementation moved to org.eclipse.cdt.utils.coff.parser.PEParser
- * But this class is still provided for backward compatibility.
- */
-public class PEParser extends org.eclipse.cdt.utils.coff.parser.PEParser {
-}
diff --git a/core/org.eclipse.cdt.core/plugin.xml b/core/org.eclipse.cdt.core/plugin.xml
index 42655d2a60c..7059d27a07c 100644
--- a/core/org.eclipse.cdt.core/plugin.xml
+++ b/core/org.eclipse.cdt.core/plugin.xml
@@ -51,7 +51,7 @@
point="org.eclipse.cdt.core.BinaryParser">
+ class="org.eclipse.cdt.utils.elf.parser.ElfParser">
@@ -71,7 +71,7 @@
point="org.eclipse.cdt.core.BinaryParser">
+ class="org.eclipse.cdt.utils.coff.parser.PEParser">
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IBinaryParser.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IBinaryParser.java
index 29553d631f1..142cae73ddf 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IBinaryParser.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IBinaryParser.java
@@ -100,6 +100,15 @@ public interface IBinaryParser {
*/
IBinaryFile getBinary(byte[] hints, IPath path) throws IOException;
+ /**
+ * Creates an IBinaryFile.
+ *
+ * @param path
+ * @return
+ * @throws IOException
+ */
+ IBinaryFile getBinary(IPath path) throws IOException;
+
/**
* Returns the name of the Format.
* @return
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEParser.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEParser.java
index 9668eac7876..c02c0b590c5 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEParser.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/PEParser.java
@@ -26,6 +26,13 @@ import org.eclipse.core.runtime.IPath;
*/
public class PEParser extends AbstractCExtension implements IBinaryParser {
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.IBinaryParser#getBinary(org.eclipse.core.runtime.IPath)
+ */
+ public IBinaryFile getBinary(IPath path) throws IOException {
+ return getBinary(null, path);
+ }
+
/**
* @see org.eclipse.cdt.core.model.IBinaryParser#getBinary(IFile)
*/
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
index 88ef454f944..49922a3c62a 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/debug/dwarf/Dwarf.java
@@ -20,7 +20,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import org.eclipse.cdt.utils.debug.DebugType;
import org.eclipse.cdt.utils.debug.DebugUnknownType;
import org.eclipse.cdt.utils.debug.IDebugEntryRequestor;
import org.eclipse.cdt.utils.debug.tools.DebugSym;
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfParser.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfParser.java
index c429f67f628..d5073fa2d32 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfParser.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/ElfParser.java
@@ -24,6 +24,14 @@ import org.eclipse.core.runtime.IPath;
*/
public class ElfParser extends AbstractCExtension implements IBinaryParser {
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.core.IBinaryParser#getBinary(org.eclipse.core.runtime.IPath)
+ */
+ public IBinaryFile getBinary(IPath path) throws IOException {
+ return getBinary(null, path);
+ }
+
+
public IBinaryFile getBinary(byte[] hints, IPath path) throws IOException {
if (path == null) {
throw new IOException("path is null");