mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-23 16:23:52 +02:00
put back the method
IBinaryParser.getBinary() Clients still use it.
This commit is contained in:
parent
5fac1942cc
commit
e2cd21ff38
10 changed files with 54 additions and 37 deletions
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
*/
|
||||
|
|
|
@ -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 {
|
||||
}
|
|
@ -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 {
|
||||
}
|
|
@ -51,7 +51,7 @@
|
|||
point="org.eclipse.cdt.core.BinaryParser">
|
||||
<cextension>
|
||||
<run
|
||||
class="org.eclipse.cdt.internal.core.model.parser.ElfParser">
|
||||
class="org.eclipse.cdt.utils.elf.parser.ElfParser">
|
||||
</run>
|
||||
</cextension>
|
||||
</extension>
|
||||
|
@ -71,7 +71,7 @@
|
|||
point="org.eclipse.cdt.core.BinaryParser">
|
||||
<cextension>
|
||||
<run
|
||||
class="org.eclipse.cdt.internal.core.model.parser.PEParser">
|
||||
class="org.eclipse.cdt.utils.coff.parser.PEParser">
|
||||
</run>
|
||||
</cextension>
|
||||
</extension>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Reference in a new issue