|
From: <caw...@us...> - 2007-01-23 01:01:56
|
Revision: 1854
http://svn.sourceforge.net/rubyeclipse/?rev=1854&view=rev
Author: cawilliams
Date: 2007-01-22 17:01:55 -0800 (Mon, 22 Jan 2007)
Log Message:
-----------
start moving towards searching loadpaths for stuff, not using that hack of linking core stubs inside a project
Added Paths:
-----------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/ExternalSourceFolderRoot.java
Added: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/ExternalSourceFolderRoot.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/ExternalSourceFolderRoot.java (rev 0)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/ExternalSourceFolderRoot.java 2007-01-23 01:01:55 UTC (rev 1854)
@@ -0,0 +1,51 @@
+package org.rubypeople.rdt.internal.core;
+
+import org.eclipse.core.runtime.IPath;
+import org.rubypeople.rdt.core.ISourceFolderRoot;
+
+public class ExternalSourceFolderRoot extends SourceFolderRoot implements
+ ISourceFolderRoot {
+
+ protected final IPath folderPath;
+
+ protected ExternalSourceFolderRoot(IPath resource,
+ RubyProject project) {
+ super(null, project);
+ this.folderPath = resource;
+ }
+
+ @Override
+ public IPath getPath() {
+ return folderPath;
+ }
+
+ @Override
+ public boolean isExternal() {
+ return true;
+ }
+
+ public int hashCode() {
+ return this.folderPath.hashCode();
+ }
+
+ @Override
+ public boolean isReadOnly() {
+ return true;
+ }
+
+ /**
+ * Returns true if this handle represents the same folder
+ * as the given handle.
+ *
+ * @see Object#equals
+ */
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o instanceof ExternalSourceFolderRoot) {
+ ExternalSourceFolderRoot other= (ExternalSourceFolderRoot) o;
+ return this.folderPath.equals(other.folderPath);
+ }
+ return false;
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|