[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] patch for RC1
|
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/ChangeLog,v
retrieving revision 1.65
diff -u -r1.65 ChangeLog
--- ChangeLog 19 Feb 2003 19:29:04 -0000 1.65
+++ ChangeLog 23 Feb 2003 19:21:13 -0000
@@ -1,3 +1,16 @@
+2003-02023 Alain Magloire
+
+ Remove implementations of IResource and IContainer.
+
+ * model/org/eclipse/cdt/internal/core/model/Container.java:
+ * model/org/eclipse/cdt/internal/core/model/parser/BinaryContainerAdapter.java:
+ * model/org/eclipse/cdt/internal/core/model/parser/BinaryFileAdapter.java:
+ Files removed.
+ * model/org/eclipse/cdt/internal/core/model/Archive.java:
+ * model/org/eclipse/cdt/internal/core/model/ArchiveInfo.java:
+ * model/org/eclipse/cdt/internal/core/model/BinaryInfo.java:
+ Remove references to BinaryFileAdapter.
+
2003-02-19 David Inglis
* src/org/eclipse/cdt/core/CCorePlugin.java
Index: model/org/eclipse/cdt/internal/core/model/Archive.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Archive.java,v
retrieving revision 1.3
diff -u -r1.3 Archive.java
--- model/org/eclipse/cdt/internal/core/model/Archive.java 18 Nov 2002 15:44:12 -0000 1.3
+++ model/org/eclipse/cdt/internal/core/model/Archive.java 23 Feb 2003 19:21:15 -0000
@@ -5,11 +5,9 @@
* All Rights Reserved.
*/
-import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.IArchive;
import org.eclipse.cdt.core.model.IBinary;
import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.internal.core.model.parser.BinaryContainerAdapter;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
@@ -24,13 +22,6 @@
public Archive(ICElement parent, IPath path) {
super (parent, path);
- }
-
- public IResource getResource() throws CModelException {
- if (archive == null) {
- archive = new BinaryContainerAdapter(getArchiveInfo().getBinaryArchive());
- }
- return archive;
}
public IBinary[] getBinaries() {
Index: model/org/eclipse/cdt/internal/core/model/ArchiveInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/ArchiveInfo.java,v
retrieving revision 1.3
diff -u -r1.3 ArchiveInfo.java
--- model/org/eclipse/cdt/internal/core/model/ArchiveInfo.java 27 Nov 2002 04:44:54 -0000 1.3
+++ model/org/eclipse/cdt/internal/core/model/ArchiveInfo.java 23 Feb 2003 19:21:15 -0000
@@ -13,8 +13,6 @@
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.ICElement;
-import org.eclipse.cdt.internal.core.model.parser.BinaryFileAdapter;
-import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -41,27 +39,25 @@
res = getElement().getResource();
} catch (CModelException e) {
}
- if (res != null && res instanceof IContainer) {
- IContainer container = (IContainer)res;
- IBinaryArchive ar = getBinaryArchive();
- IBinaryObject[] objects = ar.getObjects();
- for (int i = 0; i < objects.length; i++) {
- final IBinaryObject obj = objects[i];
- IFile file = new BinaryFileAdapter(container, obj);
- Binary binary = new Binary(getElement(), file) {
- public CElementInfo createElementInfo() {
- return new BinaryInfo(this) {
- /**
- * @see org.eclipse.cdt.internal.core.model.BinaryInfo#getBinaryObject()
- */
- IBinaryObject getBinaryObject() {
- return obj;
- }
- };
- }
- };
- addChild(binary);
- }
+ IBinaryArchive ar = getBinaryArchive();
+ IBinaryObject[] objects = ar.getObjects();
+ for (int i = 0; i < objects.length; i++) {
+ final IBinaryObject obj = objects[i];
+ Binary binary = new Binary(getElement(), res.getLocation().append(obj.getName())) {
+ public CElementInfo createElementInfo() {
+ return new BinaryInfo(this) {
+ /**
+ * @see org.eclipse.cdt.internal.core.model.BinaryInfo#getBinaryObject()
+ */
+ IBinaryObject getBinaryObject() {
+ return obj;
+ }
+ };
+ }
+ };
+ BinaryInfo info = (BinaryInfo)binary.getElementInfo();
+ info.loadChildren();
+ addChild(binary);
}
}
return super.getChildren();
Index: model/org/eclipse/cdt/internal/core/model/BinaryInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/BinaryInfo.java,v
retrieving revision 1.5
diff -u -r1.5 BinaryInfo.java
--- model/org/eclipse/cdt/internal/core/model/BinaryInfo.java 27 Nov 2002 04:45:01 -0000 1.5
+++ model/org/eclipse/cdt/internal/core/model/BinaryInfo.java 23 Feb 2003 19:21:15 -0000
@@ -38,25 +38,7 @@
public ICElement[] getChildren() {
if (hasChanged()) {
- if (hash == null) {
- hash = new HashMap();
- }
- hash.clear();
- removeChildren();
- setIsStructureKnown(true);
- IBinaryObject bin = getBinaryObject();
- ISymbol[] symbols = bin.getSymbols();
- for (int i = 0; i < symbols.length; i++) {
- switch (symbols[i].getType()) {
- case ISymbol.FUNCTION :
- addFunction(symbols[i]);
- break;
-
- case ISymbol.VARIABLE :
- addVariable(symbols[i]);
- break;
- }
- }
+ loadChildren();
}
return super.getChildren();
}
@@ -155,6 +137,28 @@
return bin.isLittleEndian();
}
return false;
+ }
+
+ void loadChildren() {
+ if (hash == null) {
+ hash = new HashMap();
+ }
+ hash.clear();
+ removeChildren();
+ setIsStructureKnown(true);
+ IBinaryObject bin = getBinaryObject();
+ ISymbol[] symbols = bin.getSymbols();
+ for (int i = 0; i < symbols.length; i++) {
+ switch (symbols[i].getType()) {
+ case ISymbol.FUNCTION :
+ addFunction(symbols[i]);
+ break;
+
+ case ISymbol.VARIABLE :
+ addVariable(symbols[i]);
+ break;
+ }
+ }
}
IBinaryObject getBinaryObject() {
Index: model/org/eclipse/cdt/internal/core/model/Container.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/Container.java
diff -N model/org/eclipse/cdt/internal/core/model/Container.java
--- model/org/eclipse/cdt/internal/core/model/Container.java 18 Nov 2002 15:49:11 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,99 +0,0 @@
-package org.eclipse.cdt.internal.core.model;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-
-public abstract class Container extends Resource implements IContainer {
-
- /**
- * @see IContainer#findMember(String)
- */
- public IResource findMember(String name) {
- return findMember(name, false);
- }
-
- /**
- * @see IContainer#findMember(String, boolean)
- */
- public IResource findMember(String name, boolean phantom) {
- return findMember(new Path(name), phantom);
- }
-
- /**
- * @see IContainer#findMember(IPath)
- */
- public IResource findMember(IPath path) {
- return findMember(path, false);
- }
-
- /**
- * @see IContainer#findMember(IPath)
- */
- public IResource findMember(IPath path, boolean phantom) {
- path = getFullPath().append(path);
- try {
- IResource[] resources = members(phantom);
- for (int i = 0; i < resources.length; i++) {
- if (resources[i].getFullPath().equals(path)) {
- return resources[i];
- }
- }
- } catch (CoreException e) {
- }
- return null;
- }
-
- /**
- * @see IContainer#getFile(String)
- */
- public IFile getFile(String name) {
- return getFile(new Path(name));
- }
-
- /**
- * @see IContainer#getFolder(String)
- */
- public IFolder getFolder(String name) {
- return getFolder(new Path(name));
- }
-
- /**
- * @see IContainer#members
- */
- public IResource[] members() throws CoreException {
- return members(IResource.NONE);
- }
-
- /**
- * @see IContainer#members(boolean)
- */
- public IResource[] members(boolean phantom) throws CoreException {
- return members(phantom ? INCLUDE_PHANTOMS : IResource.NONE);
- }
-
- /*
- * @see IContainer#members(int)
- */
- public abstract IResource[] members(int memberFlags) throws CoreException;
-
- /**
- * @see IContainer#exits(IPath)
- */
- public abstract boolean exists(IPath path);
-
- /**
- * @see IContainer#getFile(IPath)
- */
- public abstract IFile getFile(IPath path);
-
- /**
- * @see IContainer#getFolder(IPath)
- */
- public abstract IFolder getFolder(IPath path);
-
-}
Index: model/org/eclipse/cdt/internal/core/model/parser/BinaryContainerAdapter.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/parser/BinaryContainerAdapter.java
diff -N model/org/eclipse/cdt/internal/core/model/parser/BinaryContainerAdapter.java
--- model/org/eclipse/cdt/internal/core/model/parser/BinaryContainerAdapter.java 19 Dec 2002 20:50:14 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,282 +0,0 @@
-package org.eclipse.cdt.internal.core.model.parser;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.util.ArrayList;
-
-import org.eclipse.cdt.core.IBinaryParser.IBinaryArchive;
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.internal.core.model.Container;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-
-/**
- */
-public class BinaryContainerAdapter extends Container implements IFolder {
-
- IBinaryArchive archive;
- long timestamp;
- ArrayList children;
- ArrayList phantomResources;
-
- public BinaryContainerAdapter (IBinaryArchive ar) {
- archive = ar;
- phantomResources = new ArrayList(0);
- children = new ArrayList(5);
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#refreshLocal(int, IProgressMonitor)
- */
- public void refreshLocal(int depth, IProgressMonitor monitor) throws CoreException {
- IFile file = archive.getFile();
- if (file != null) {
- file.refreshLocal(depth, monitor);
- }
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getFullPath()
- */
- public IPath getFullPath() {
- IFile file = archive.getFile();
- if (file != null) {
- return file.getFullPath();
- }
- return new Path("");
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getParent()
- */
- public IContainer getParent() {
- IFile file = archive.getFile();
- if (file != null) {
- return file.getParent();
- }
- return null;
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getType()
- */
- public int getType() {
- return IResource.FOLDER;
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getModificationStamp()
- */
- public long getModificationStamp() {
- IFile file = archive.getFile();
- if (file != null) {
- return file.getModificationStamp();
- }
- return 0;
- }
-
- /**
- * @see org.eclipse.core.resources.IFolder#delete(boolean, boolean, IProgressMonitor)
- */
- public void delete(boolean force, boolean keepHistory,
- IProgressMonitor monitor) throws CoreException {
- delete((keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#delete(int, IProgressMonitor)
- */
- public void delete(int updateFlags, IProgressMonitor monitor) throws CoreException {
- IFile file = archive.getFile();
- if (file != null) {
- file.delete(updateFlags, monitor);
- }
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#touch(IProgressMonitor)
- */
- public void touch(IProgressMonitor monitor) throws CoreException {
- IFile file = archive.getFile();
- if (file != null) {
- file.touch(monitor);
- }
- }
-
- /**
- * @see org.eclipse.core.resources.IFolder#create(boolean, boolean, IProgressMonitor)
- */
- public void create(boolean force, boolean local, IProgressMonitor monitor)
- throws CoreException {
- create((force ? FORCE : IResource.NONE), local, monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IFolder#create(int, boolean, IProgressMonitor)
- */
- public void create(int updateFlags, boolean local,
- IProgressMonitor monitor) throws CoreException {
- // FIXME: Not implemented.
- }
-
- /**
- * @see org.eclipse.core.resources.IFolder#getFile(String)
- */
- public IFile getFile(IPath path) {
- IFile f = (IFile)findMember(path);
- if (f == null) {
- // Pass it to parent to create a fake/phantom if the object
- // is not in the archive.
- IContainer container = getParent();
- if (container != null) {
- f = container.getFile(path);
- // Add it to the list of phantoms
- if (! phantomResources.contains(f)) {
- phantomResources.add(f);
- phantomResources.trimToSize();
- }
- }
- }
- return f;
- }
-
- /**
- * @see org.eclipse.core.resources.IFolder#move(IPath, boolean, boolean, IProgressMonitor)
- */
- public void move(IPath destination, boolean force, boolean keepHistory,
- IProgressMonitor monitor) throws CoreException {
- move(destination, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IContainer#exists(IPath)
- */
- public boolean exists(IPath path) {
- // Check if it is the archive.
- if (getFullPath().equals(path)) {
- IFile file = archive.getFile();
- if (file != null) {
- return file.exists();
- }
- return false;
- }
- return findMember(path) != null;
- }
-
- /**
- * @see org.eclipse.core.resources.IContainer#getFolder(IPath)
- */
- public IFolder getFolder(IPath path) {
- // Only Files in the archive pass this to the parent
- // to create a phatom resource
- IFolder f = null;
- IContainer container = getParent();
- if (container != null) {
- f = container.getFolder(path);
- if (!phantomResources.contains(f)) {
- phantomResources.add(f);
- phantomResources.trimToSize();
- }
- }
- return f;
- }
-
- /**
- * @see org.eclipse.core.resources.IContainer#members(int)
- */
- public IResource[] members(int memberFlags) throws CoreException {
- final boolean includePhantoms = (memberFlags & IContainer.INCLUDE_PHANTOMS) != 0;
- final boolean includeTeamPrivateMember =
- (memberFlags & IContainer.INCLUDE_TEAM_PRIVATE_MEMBERS) != 0;
-
- ArrayList aList = new ArrayList();
-
- if (hasChanged()) {
- children.clear();
- IBinaryObject[] objects = archive.getObjects();
- for (int i = 0; i < objects.length; i++) {
- children.add(new BinaryFileAdapter(this, objects[i]));
- }
- }
-
- for (int i = 0; i < children.size(); i++) {
- IResource child = (IResource)children.get(i);
- if (includeTeamPrivateMember && child.isTeamPrivateMember() || !child.isTeamPrivateMember()) {
- aList.add(child);
- }
- }
-
- if (includePhantoms) {
- aList.addAll(phantomResources);
- }
- return (IResource[])aList.toArray(new IResource[0]);
- }
-
- /**
- * @see org.eclipse.core.resources.IContainer#findDeletedMembersWithHistory(int, IProgressMonitor)
- */
- public IFile[] findDeletedMembersWithHistory(int depth, IProgressMonitor monitor)
- throws CoreException {
- return new IFile[0];
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getPersistentProperty(QualifiedName)
- */
- public String getPersistentProperty(QualifiedName key) throws CoreException {
- IFile file = archive.getFile();
- if (file != null) {
- return file.getPersistentProperty(key);
- }
- return null;
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#setPersistentProperty(QualifiedName, String)
- */
- public void setPersistentProperty(QualifiedName key, String value) throws CoreException {
- IFile file = archive.getFile();
- if (file != null) {
- file.setPersistentProperty(key, value);
- }
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#exists()
- */
- public boolean exists() {
- IFile file = archive.getFile();
- if (file != null) {
- return file.exists();
- }
- return false;
- }
-
- boolean hasChanged() {
- boolean changed;
- long modif = getModificationStamp();
- changed = modif != timestamp;
- timestamp = modif;
- return changed;
- }
- /**
- * @see org.eclipse.core.resources.IFolder#createLink(org.eclipse.core.runtime.IPath, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void createLink(
- IPath localLocation,
- int updateFlags,
- IProgressMonitor monitor)
- throws CoreException {
- }
-
-}
Index: model/org/eclipse/cdt/internal/core/model/parser/BinaryFileAdapter.java
===================================================================
RCS file: model/org/eclipse/cdt/internal/core/model/parser/BinaryFileAdapter.java
diff -N model/org/eclipse/cdt/internal/core/model/parser/BinaryFileAdapter.java
--- model/org/eclipse/cdt/internal/core/model/parser/BinaryFileAdapter.java 13 Dec 2002 14:55:42 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,241 +0,0 @@
-package org.eclipse.cdt.internal.core.model.parser;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2001.
- * All Rights Reserved.
- */
-
-import java.io.InputStream;
-
-import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
-import org.eclipse.cdt.internal.core.model.Resource;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFileState;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.QualifiedName;
-
-/**
- */
-public class BinaryFileAdapter extends Resource implements IFile {
-
- IBinaryObject object;
- IContainer parent;
-
- public BinaryFileAdapter(IContainer p, IBinaryObject o) {
- object = o;
- parent = p;
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#appendContents(InputStream, boolean, boolean, IProgressMonitor)
- */
- public void appendContents(InputStream source, boolean force, boolean keepHistory, IProgressMonitor monitor) throws CoreException {
- appendContents(source, (keepHistory ? KEEP_HISTORY : IResource.NONE) | (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#appendContents(InputStream, int, IProgressMonitor)
- */
- public void appendContents(InputStream source, int updateFlags, IProgressMonitor monitor)
- throws CoreException {
- // FIXME: Not implemented.
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#create(InputStream, boolean, IProgressMonitor)
- */
- public void create(InputStream source, boolean force,
- IProgressMonitor monitor) throws CoreException {
- create(source, (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#create(InputStream, int, IProgressMonitor)
- */
- public void create(InputStream source, int updateFlags,
- IProgressMonitor monitor) throws CoreException {
- // FIXME: Not implemented.
- }
-
- /**
- * @see org.eclipse.core.resources.IStorage#getContents()
- */
- public InputStream getContents() throws CoreException {
- return getContents(false);
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#getContents(boolean)
- */
- public InputStream getContents(boolean force) throws CoreException {
- return object.getContents();
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#getEncoding()
- */
- public int getEncoding() throws CoreException {
- return ENCODING_UNKNOWN;
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#getHistory(IProgressMonitor)
- */
- public IFileState[] getHistory(IProgressMonitor monitor)
- throws CoreException {
- return new IFileState[0];
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#move(IPath, boolean, boolean, IProgressMonitor)
- */
- public void move(IPath destination, boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException {
- move(destination, (keepHistory ? KEEP_HISTORY : IResource.NONE)
- | (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#setContents(InputStream, boolean, boolean, IProgressMonitor)
- */
- public void setContents(InputStream source, boolean force, boolean keepHistory,
- IProgressMonitor monitor) throws CoreException {
- setContents(source, (keepHistory ? KEEP_HISTORY : IResource.NONE)
- | (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#setContents(IFileState, boolean, boolean, IProgressMonitor)
- */
- public void setContents(IFileState source, boolean force, boolean keepHistory,
- IProgressMonitor monitor) throws CoreException {
- setContents(source, (keepHistory ? KEEP_HISTORY : IResource.NONE)
- | (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#setContents(InputStream, int, IProgressMonitor)
- */
- public void setContents(InputStream source, int updateFlags, IProgressMonitor monitor)
- throws CoreException {
- // FIXME: Not implemented.
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#setContents(IFileState, int, IProgressMonitor)
- */
- public void setContents(IFileState source, int updateFlags, IProgressMonitor monitor)
- throws CoreException {
- // FIXME: Not implemented.
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#delete(boolean, boolean, IProgressMonitor)
- */
- public void delete(boolean force, boolean keepHistory, IProgressMonitor monitor)
- throws CoreException {
- delete((keepHistory ? KEEP_HISTORY : IResource.NONE)
- | (force ? FORCE : IResource.NONE), monitor);
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#delete(int, IProgressMonitor)
- */
- public void delete(int updateFlags, IProgressMonitor monitor) throws CoreException {
- // FIXME: Not implemented.
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getFullPath()
- */
- public IPath getFullPath() {
- IFile file = object.getFile();
- if (file != null) {
- return file.getFullPath().append(object.getName());
- }
- return new Path(object.getName());
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getModificationStamp()
- */
- public long getModificationStamp() {
- IFile file = object.getFile();
- if (file != null) {
- return file.getModificationStamp();
- }
- return 0;
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getParent()
- */
- public IContainer getParent() {
- return parent;
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getType()
- */
- public int getType() {
- return IResource.FILE;
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#refreshLocal(int, IProgressMonitor)
- */
- public void refreshLocal(int depth, IProgressMonitor monitor) throws CoreException {
- IFile file = object.getFile();
- if (file != null) {
- file.refreshLocal(depth, monitor);
- }
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#touch(IProgressMonitor)
- */
- public void touch(IProgressMonitor monitor) throws CoreException {
- IFile file = object.getFile();
- if (file != null) {
- file.touch(monitor);
- }
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#getPersistentProperty(QualifiedName)
- */
- public String getPersistentProperty(QualifiedName key)
- throws CoreException {
- return null;
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#setPersistentProperty(QualifiedName, String)
- */
- public void setPersistentProperty(QualifiedName key, String value)
- throws CoreException {
- }
-
- /**
- * @see org.eclipse.core.resources.IResource#exists()
- */
- public boolean exists() {
- return parent.exists(new Path(getName()));
- }
-
- /**
- * @see org.eclipse.core.resources.IFile#createLink(org.eclipse.core.runtime.IPath, int, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void createLink(
- IPath localLocation,
- int updateFlags,
- IProgressMonitor monitor)
- throws CoreException {
- }
-
-}