|
From: <caw...@us...> - 2007-06-05 14:54:48
|
Revision: 2579
http://svn.sourceforge.net/rubyeclipse/?rev=2579&view=rev
Author: cawilliams
Date: 2007-06-05 07:54:47 -0700 (Tue, 05 Jun 2007)
Log Message:
-----------
some fixes
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceFolder.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/IndexSelector.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceFolder.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceFolder.java 2007-06-05 14:52:04 UTC (rev 2578)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/SourceFolder.java 2007-06-05 14:54:47 UTC (rev 2579)
@@ -180,7 +180,7 @@
public IResource getResource() {
SourceFolderRoot root = this.getSourceFolderRoot();
- if (root.isArchive()) {
+ if (root.isExternal()) {
return root.getResource();
}
int length = this.names.length;
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/IndexSelector.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/IndexSelector.java 2007-06-05 14:52:04 UTC (rev 2578)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/IndexSelector.java 2007-06-05 14:54:47 UTC (rev 2579)
@@ -19,6 +19,7 @@
import org.rubypeople.rdt.core.search.IRubySearchScope;
import org.rubypeople.rdt.core.search.SearchPattern;
import org.rubypeople.rdt.internal.compiler.util.SimpleSet;
+import org.rubypeople.rdt.internal.core.ExternalSourceFolderRoot;
import org.rubypeople.rdt.internal.core.RubyModelManager;
import org.rubypeople.rdt.internal.core.RubyProject;
import org.rubypeople.rdt.internal.core.search.indexing.IndexManager;
@@ -90,17 +91,17 @@
return true;
}
}
-// if (focus instanceof JarSourceFolderRoot) {
-// // focus is part of a jar
-// IPath focusPath = focus.getPath();
-// ILoadpathEntry[] entries = javaProject.getExpandedLoadpath();
-// for (int i = 0, length = entries.length; i < length; i++) {
-// ILoadpathEntry entry = entries[i];
-// if (entry.getEntryKind() == ILoadpathEntry.CPE_LIBRARY && entry.getPath().equals(focusPath))
-// return true;
-// }
-// return false;
-// }
+ if (focus instanceof ExternalSourceFolderRoot) {
+ // focus is part of a jar
+ IPath focusPath = focus.getPath();
+ ILoadpathEntry[] entries = javaProject.getExpandedLoadpath(true);
+ for (int i = 0, length = entries.length; i < length; i++) {
+ ILoadpathEntry entry = entries[i];
+ if (entry.getEntryKind() == ILoadpathEntry.CPE_LIBRARY && entry.getPath().equals(focusPath))
+ return true;
+ }
+ return false;
+ }
// look for dependent projects
IPath focusPath = ((RubyProject) focus).getProject().getFullPath();
ILoadpathEntry[] entries = javaProject.getExpandedLoadpath(true);
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java 2007-06-05 14:52:04 UTC (rev 2578)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/CharOperation.java 2007-06-05 14:54:47 UTC (rev 2579)
@@ -1648,7 +1648,8 @@
}
public static char[] concatWith(char[][] enclosingTypeNames, String string) {
- StringBuffer buffer = new StringBuffer();
+ if (enclosingTypeNames == null) return NO_CHAR;
+ StringBuffer buffer = new StringBuffer();
for (int i = 0; i < enclosingTypeNames.length; i++) {
char[] name = enclosingTypeNames[i];
if (i > 0) buffer.append(string);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|