| /* |
| * Created on Apr 2, 2003 |
| * |
| * To change this generated comment go to |
| * Window>Preferences>Java>Code Generation>Code Template |
| */ |
| package org.eclipse.cdt.internal.core.model; |
| |
| import org.eclipse.cdt.core.IBinaryParser.IBinaryArchive; |
| import org.eclipse.cdt.core.model.ICElement; |
| import org.eclipse.cdt.core.model.ILibraryEntry; |
| import org.eclipse.cdt.core.model.ILibraryReference; |
| import org.eclipse.core.resources.IResource; |
| import org.eclipse.core.runtime.IPath; |
| |
| /** |
| * @author alain |
| */ |
| public class LibraryReferenceArchive extends Archive implements ILibraryReference { |
| |
| ILibraryEntry entry; |
| IBinaryArchive archive; |
| |
| public LibraryReferenceArchive(ICElement parent, ILibraryEntry e, IBinaryArchive ar) { |
| super(parent, e.getLibraryPath()); |
| setElementType(ICElement.C_VCONTAINER); |
| entry = e; |
| archive = ar; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.cdt.core.model.ICElement#getResource() |
| */ |
| public IResource getResource() { |
| return null; |
| } |
| |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.cdt.core.model.ICElement#getPath() |
| */ |
| public IPath getPath() { |
| return entry.getLibraryPath(); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.cdt.internal.core.model.Archive#getBinaryArchive(org.eclipse.core.resources.IResource) |
| */ |
| IBinaryArchive getBinaryArchive(IResource res) { |
| return archive; |
| } |
| |
| } |