|
From: <caw...@us...> - 2007-08-22 21:05:33
|
Revision: 3048
http://rubyeclipse.svn.sourceforge.net/rubyeclipse/?rev=3048&view=rev
Author: cawilliams
Date: 2007-08-22 14:05:16 -0700 (Wed, 22 Aug 2007)
Log Message:
-----------
update to latest JRuby. Also fix ITypeHierarchy interface to refer to modules and not interfaces
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/ITypeHierarchy.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/CreateTypeHierarchyOperation.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/ChangeCollector.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyBuilder.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/RegionBasedTypeHierarchy.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/TypeHierarchy.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/ITypeHierarchy.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/ITypeHierarchy.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/ITypeHierarchy.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -76,7 +76,7 @@
*
* @return all interfaces in this type hierarchy's graph
*/
-IType[] getAllInterfaces();
+IType[] getAllModules();
/**
* Returns all resolved subtypes (direct and indirect) of the
* given type, in no particular order, limited to the
@@ -118,7 +118,7 @@
* @param type the given type
* @return all resolved superinterfaces (direct and indirect) of the given type, an empty array if none
*/
-IType[] getAllSuperInterfaces(IType type);
+IType[] getAllSuperModules(IType type);
/**
* Returns all resolved supertypes of the
* given type, in bottom-up order. An empty array
@@ -168,7 +168,7 @@
* @return all interfaces resolved to extend the given interface limited to the interfaces in this
* hierarchy's graph, an empty array if none.
*/
-IType[] getExtendingInterfaces(IType type);
+IType[] getExtendingModules(IType type);
/**
* Returns all classes resolved to implement the given interface,
* in no particular order, limited to the classes in this type
@@ -180,7 +180,7 @@
* @return all classes resolved to implement the given interface limited to the classes in this type
* hierarchy's graph, an empty array if none
*/
-IType[] getImplementingClasses(IType type);
+IType[] getIncludingClasses(IType type);
/**
* Returns all classes in the graph which have no resolved superclass,
* in no particular order.
@@ -194,7 +194,7 @@
*
* @return all interfaces in the graph which have no resolved superinterfaces
*/
-IType[] getRootInterfaces();
+IType[] getRootModules();
/**
* Returns the direct resolved subclasses of the given class,
* in no particular order, limited to the classes in this
@@ -245,7 +245,7 @@
* @return the direct resolved interfaces that the given type implements or extends limited to the interfaces in this type
* hierarchy's graph
*/
-IType[] getSuperInterfaces(IType type);
+IType[] getSuperModules(IType type);
/**
* Returns the resolved supertypes of the given type,
* in no particular order, limited to the types in this
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/core/util/RDocUtil.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -11,7 +11,6 @@
import org.eclipse.jface.text.Region;
import org.jruby.Ruby;
import org.jruby.ast.CommentNode;
-import org.jruby.exceptions.RaiseException;
import org.jruby.lexer.yacc.ISourcePosition;
import org.jruby.runtime.builtin.IRubyObject;
import org.rubypeople.rdt.core.IMember;
@@ -128,7 +127,7 @@
Ruby ruby = getJRubyInstance();
try {
ruby.setCurrentDirectory(getRDocScriptPath());
- IRubyObject object = ruby.evalScript(script);
+ IRubyObject object = ruby.evalScriptlet(script);
docs = object.toString();
} catch (Exception e) {
// ignore
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/CreateTypeHierarchyOperation.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/CreateTypeHierarchyOperation.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/CreateTypeHierarchyOperation.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -116,7 +116,7 @@
if (elementToProcess != null && !elementToProcess.exists()) {
return new RubyModelStatus(IRubyModelStatusConstants.ELEMENT_DOES_NOT_EXIST, elementToProcess);
}
- IRubyProject project = this.typeHierarchy.javaProject();
+ IRubyProject project = this.typeHierarchy.rubyProject();
if (project != null && !project.exists()) {
return new RubyModelStatus(IRubyModelStatusConstants.ELEMENT_DOES_NOT_EXIST, project);
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/ChangeCollector.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/ChangeCollector.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/ChangeCollector.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -403,7 +403,7 @@
}
// check super interfaces
- IType[] existingSuperInterfaces = this.hierarchy.getSuperInterfaces(type);
+ IType[] existingSuperInterfaces = this.hierarchy.getSuperModules(type);
String[] newSuperInterfaces = type.getIncludedModuleNames();
if (existingSuperInterfaces.length != newSuperInterfaces.length) {
return true;
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyBuilder.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyBuilder.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/HierarchyBuilder.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -46,7 +46,7 @@
public HierarchyBuilder(TypeHierarchy hierarchy) throws RubyModelException {
this.hierarchy = hierarchy;
- RubyProject project = (RubyProject) hierarchy.javaProject();
+ RubyProject project = (RubyProject) hierarchy.rubyProject();
IType focusType = hierarchy.getType();
org.rubypeople.rdt.core.IRubyScript unitToLookInside = focusType == null ? null : focusType.getRubyScript();
@@ -119,7 +119,7 @@
}
// now do the caching
if (typeHandle.isModule()) {
- this.hierarchy.addInterface(typeHandle);
+ this.hierarchy.addModule(typeHandle);
} else {
if (superclassHandle == null) {
this.hierarchy.addRootClass(typeHandle);
@@ -130,7 +130,7 @@
if (superinterfaceHandles == null) {
superinterfaceHandles = TypeHierarchy.NO_TYPE;
}
- this.hierarchy.cacheSuperInterfaces(typeHandle, superinterfaceHandles);
+ this.hierarchy.cacheSuperModules(typeHandle, superinterfaceHandles);
// record flags
this.hierarchy.cacheFlags(typeHandle, /*type.getModifiers()*/ 0 );
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/RegionBasedTypeHierarchy.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/RegionBasedTypeHierarchy.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/RegionBasedTypeHierarchy.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -120,12 +120,12 @@
/**
* Returns the java project this hierarchy was created in.
*/
-public IRubyProject javaProject() {
+public IRubyProject rubyProject() {
return this.project;
}
public void pruneDeadBranches() {
pruneDeadBranches(getRootClasses());
- pruneDeadBranches(getRootInterfaces());
+ pruneDeadBranches(getRootModules());
}
/*
* Returns whether all subtypes of the given type have been pruned.
@@ -162,7 +162,7 @@
TypeVector types = (TypeVector)this.typeToSubtypes.get(superclass);
if (types != null) types.remove(type);
}
- IType[] superinterfaces = (IType[])this.typeToSuperInterfaces.remove(type);
+ IType[] superinterfaces = (IType[])this.typeToSuperModules.remove(type);
if (superinterfaces != null) {
for (int i = 0, length = superinterfaces.length; i < length; i++) {
IType superinterface = superinterfaces[i];
@@ -170,7 +170,7 @@
if (types != null) types.remove(type);
}
}
- this.interfaces.remove(type);
+ this.modules.remove(type);
}
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/TypeHierarchy.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/TypeHierarchy.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/hierarchy/TypeHierarchy.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -100,11 +100,11 @@
protected IRubyScript[] workingCopies;
protected Map classToSuperclass;
- protected Map typeToSuperInterfaces;
+ protected Map typeToSuperModules;
protected Map typeToSubtypes;
protected Map typeFlags;
protected TypeVector rootClasses = new TypeVector();
- protected ArrayList interfaces = new ArrayList(10);
+ protected ArrayList modules = new ArrayList(10);
public ArrayList missingTypes = new ArrayList(4);
protected static final IType[] NO_TYPE = new IType[0];
@@ -219,8 +219,8 @@
/**
* Adds the type to the collection of interfaces.
*/
-protected void addInterface(IType type) {
- this.interfaces.add(type);
+protected void addModule(IType type) {
+ this.modules.add(type);
}
/**
* Adds the type to the collection of root classes
@@ -286,15 +286,15 @@
}
}
/**
- * Caches all of the superinterfaces that are specified for the
+ * Caches all of the supermodules that are specified for the
* type.
*/
-protected void cacheSuperInterfaces(IType type, IType[] superinterfaces) {
- this.typeToSuperInterfaces.put(type, superinterfaces);
- for (int i = 0; i < superinterfaces.length; i++) {
- IType superinterface = superinterfaces[i];
- if (superinterface != null) {
- addSubtype(superinterface, type);
+protected void cacheSuperModules(IType type, IType[] supermodules) {
+ this.typeToSuperModules.put(type, supermodules);
+ for (int i = 0; i < supermodules.length; i++) {
+ IType supermodule = supermodules[i];
+ if (supermodule != null) {
+ addSubtype(supermodule, type);
}
}
}
@@ -336,7 +336,7 @@
if (this.rootClasses.contains(type)) return true;
// interfaces
- if (this.interfaces.contains(type)) return true;
+ if (this.modules.contains(type)) return true;
return false;
}
@@ -359,7 +359,7 @@
public boolean exists() {
if (!this.needsRefresh) return true;
- return (this.focusType == null || this.focusType.exists()) && this.javaProject().exists();
+ return (this.focusType == null || this.focusType.exists()) && this.rubyProject().exists();
}
/**
* Notifies listeners that this hierarchy has changed and needs
@@ -412,9 +412,9 @@
/**
* @see ITypeHierarchy
*/
-public IType[] getAllInterfaces() {
- IType[] collection= new IType[this.interfaces.size()];
- this.interfaces.toArray(collection);
+public IType[] getAllModules() {
+ IType[] collection= new IType[this.modules.size()];
+ this.modules.toArray(collection);
return collection;
}
/**
@@ -460,27 +460,27 @@
/**
* @see ITypeHierarchy
*/
-public IType[] getAllSuperInterfaces(IType type) {
+public IType[] getAllSuperModules(IType type) {
ArrayList supers = new ArrayList();
- if (this.typeToSuperInterfaces.get(type) == null) {
+ if (this.typeToSuperModules.get(type) == null) {
return NO_TYPE;
}
- getAllSuperInterfaces0(type, supers);
- IType[] superinterfaces = new IType[supers.size()];
- supers.toArray(superinterfaces);
- return superinterfaces;
+ getAllSuperModules0(type, supers);
+ IType[] supermodules = new IType[supers.size()];
+ supers.toArray(supermodules);
+ return supermodules;
}
-private void getAllSuperInterfaces0(IType type, ArrayList supers) {
- IType[] superinterfaces = (IType[]) this.typeToSuperInterfaces.get(type);
+private void getAllSuperModules0(IType type, ArrayList supers) {
+ IType[] superinterfaces = (IType[]) this.typeToSuperModules.get(type);
if (superinterfaces != null && superinterfaces.length != 0) {
addAllCheckingDuplicates(supers, superinterfaces);
for (int i = 0; i < superinterfaces.length; i++) {
- getAllSuperInterfaces0(superinterfaces[i], supers);
+ getAllSuperModules0(superinterfaces[i], supers);
}
}
IType superclass = (IType) this.classToSuperclass.get(type);
if (superclass != null) {
- getAllSuperInterfaces0(superclass, supers);
+ getAllSuperModules0(superclass, supers);
}
}
/**
@@ -488,7 +488,7 @@
*/
public IType[] getAllSupertypes(IType type) {
ArrayList supers = new ArrayList();
- if (this.typeToSuperInterfaces.get(type) == null) {
+ if (this.typeToSuperModules.get(type) == null) {
return NO_TYPE;
}
getAllSupertypes0(type, supers);
@@ -497,11 +497,11 @@
return supertypes;
}
private void getAllSupertypes0(IType type, ArrayList supers) {
- IType[] superinterfaces = (IType[]) this.typeToSuperInterfaces.get(type);
+ IType[] superinterfaces = (IType[]) this.typeToSuperModules.get(type);
if (superinterfaces != null && superinterfaces.length != 0) {
addAllCheckingDuplicates(supers, superinterfaces);
for (int i = 0; i < superinterfaces.length; i++) {
- getAllSuperInterfaces0(superinterfaces[i], supers);
+ getAllSuperModules0(superinterfaces[i], supers);
}
}
IType superclass = (IType) this.classToSuperclass.get(type);
@@ -516,7 +516,7 @@
public IType[] getAllTypes() {
IType[] classes = getAllClasses();
int classesLength = classes.length;
- IType[] allInterfaces = getAllInterfaces();
+ IType[] allInterfaces = getAllModules();
int interfacesLength = allInterfaces.length;
IType[] all = new IType[classesLength + interfacesLength];
System.arraycopy(classes, 0, all, 0, classesLength);
@@ -538,23 +538,23 @@
/**
* @see ITypeHierarchy
*/
-public IType[] getExtendingInterfaces(IType type) {
- if (!this.isInterface(type)) return NO_TYPE;
- return getExtendingInterfaces0(type);
+public IType[] getExtendingModules(IType type) {
+ if (!this.isModule(type)) return NO_TYPE;
+ return getExtendingModules0(type);
}
/**
- * Assumes that the type is an interface
- * @see #getExtendingInterfaces
+ * Assumes that the type is an module
+ * @see #getExtendingModules
*/
-private IType[] getExtendingInterfaces0(IType extendedInterface) {
- Iterator iter = this.typeToSuperInterfaces.keySet().iterator();
+private IType[] getExtendingModules0(IType extendedInterface) {
+ Iterator iter = this.typeToSuperModules.keySet().iterator();
ArrayList interfaceList = new ArrayList();
while (iter.hasNext()) {
IType type = (IType) iter.next();
- if (!this.isInterface(type)) {
+ if (!this.isModule(type)) {
continue;
}
- IType[] superInterfaces = (IType[]) this.typeToSuperInterfaces.get(type);
+ IType[] superInterfaces = (IType[]) this.typeToSuperModules.get(type);
if (superInterfaces != null) {
for (int i = 0; i < superInterfaces.length; i++) {
IType superInterface = superInterfaces[i];
@@ -571,26 +571,26 @@
/**
* @see ITypeHierarchy
*/
-public IType[] getImplementingClasses(IType type) {
- if (!this.isInterface(type)) {
+public IType[] getIncludingClasses(IType type) {
+ if (!this.isModule(type)) {
return NO_TYPE;
}
- return getImplementingClasses0(type);
+ return getIncludingClasses0(type);
}
/**
* Assumes that the type is an interface
- * @see #getImplementingClasses
+ * @see #getIncludingClasses
*/
-private IType[] getImplementingClasses0(IType interfce) {
+private IType[] getIncludingClasses0(IType interfce) {
- Iterator iter = this.typeToSuperInterfaces.keySet().iterator();
+ Iterator iter = this.typeToSuperModules.keySet().iterator();
ArrayList iMenters = new ArrayList();
while (iter.hasNext()) {
IType type = (IType) iter.next();
- if (this.isInterface(type)) {
+ if (this.isModule(type)) {
continue;
}
- IType[] types = (IType[]) this.typeToSuperInterfaces.get(type);
+ IType[] types = (IType[]) this.typeToSuperModules.get(type);
for (int i = 0; i < types.length; i++) {
IType iFace = types[i];
if (iFace.equals(interfce)) {
@@ -611,12 +611,12 @@
/**
* @see ITypeHierarchy
*/
-public IType[] getRootInterfaces() {
- IType[] allInterfaces = getAllInterfaces();
+public IType[] getRootModules() {
+ IType[] allInterfaces = getAllModules();
IType[] roots = new IType[allInterfaces.length];
int rootNumber = 0;
for (int i = 0; i < allInterfaces.length; i++) {
- IType[] superInterfaces = getSuperInterfaces(allInterfaces[i]);
+ IType[] superInterfaces = getSuperModules(allInterfaces[i]);
if (superInterfaces == null || superInterfaces.length == 0) {
roots[rootNumber++] = allInterfaces[i];
}
@@ -631,7 +631,7 @@
* @see ITypeHierarchy
*/
public IType[] getSubclasses(IType type) {
- if (this.isInterface(type)) {
+ if (this.isModule(type)) {
return NO_TYPE;
}
TypeVector vector = (TypeVector)this.typeToSubtypes.get(type);
@@ -660,7 +660,7 @@
* @see ITypeHierarchy
*/
public IType getSuperclass(IType type) {
- if (this.isInterface(type)) {
+ if (this.isModule(type)) {
return null;
}
return (IType) this.classToSuperclass.get(type);
@@ -668,8 +668,8 @@
/**
* @see ITypeHierarchy
*/
-public IType[] getSuperInterfaces(IType type) {
- IType[] types = (IType[]) this.typeToSuperInterfaces.get(type);
+public IType[] getSuperModules(IType type) {
+ IType[] types = (IType[]) this.typeToSuperModules.get(type);
if (types == null) {
return NO_TYPE;
}
@@ -681,9 +681,9 @@
public IType[] getSupertypes(IType type) {
IType superclass = getSuperclass(type);
if (superclass == null) {
- return getSuperInterfaces(type);
+ return getSuperModules(type);
} else {
- TypeVector superTypes = new TypeVector(getSuperInterfaces(type));
+ TypeVector superTypes = new TypeVector(getSuperModules(type));
superTypes.add(superclass);
return superTypes.elements();
}
@@ -800,11 +800,11 @@
}
int smallSize = (size / 2);
this.classToSuperclass = new HashMap(size);
- this.interfaces = new ArrayList(smallSize);
+ this.modules = new ArrayList(smallSize);
this.missingTypes = new ArrayList(smallSize);
this.rootClasses = new TypeVector();
this.typeToSubtypes = new HashMap(smallSize);
- this.typeToSuperInterfaces = new HashMap(smallSize);
+ this.typeToSuperModules = new HashMap(smallSize);
this.typeFlags = new HashMap(smallSize);
this.projectRegion = new Region();
@@ -854,7 +854,7 @@
switch (delta.getKind()) {
case IRubyElementDelta.ADDED :
case IRubyElementDelta.REMOVED :
- return element.equals(this.javaProject().getRubyModel());
+ return element.equals(this.rubyProject().getRubyModel());
case IRubyElementDelta.CHANGED :
return isAffectedByChildren(delta);
}
@@ -876,7 +876,7 @@
case IRubyElementDelta.ADDED :
try {
// if the added project is on the classpath, then the hierarchy has changed
- ILoadpathEntry[] classpath = ((RubyProject)this.javaProject()).getExpandedLoadpath(true);
+ ILoadpathEntry[] classpath = ((RubyProject)this.rubyProject()).getExpandedLoadpath(true);
for (int i = 0; i < classpath.length; i++) {
if (classpath[i].getEntryKind() == ILoadpathEntry.CPE_PROJECT
&& classpath[i].getPath().equals(element.getPath())) {
@@ -886,7 +886,7 @@
if (this.focusType != null) {
// if the hierarchy's project is on the added project classpath, then the hierarchy has changed
classpath = ((RubyProject)element).getExpandedLoadpath(true);
- IPath hierarchyProject = javaProject().getPath();
+ IPath hierarchyProject = rubyProject().getPath();
for (int i = 0; i < classpath.length; i++) {
if (classpath[i].getEntryKind() == ILoadpathEntry.CPE_PROJECT
&& classpath[i].getPath().equals(hierarchyProject)) {
@@ -1007,18 +1007,13 @@
}
return false;
}
-private boolean isInterface(IType type) {
-// int flags = this.getCachedFlags(type);
-// if (flags == -1) {
- return type.isModule();
-// } else {
-// return Flags.isModule(flags);
-// }
+private boolean isModule(IType type) {
+ return type.isModule();
}
/**
- * Returns the java project this hierarchy was created in.
+ * Returns the ruby project this hierarchy was created in.
*/
-public IRubyProject javaProject() {
+public IRubyProject rubyProject() {
return this.focusType.getRubyProject();
}
protected static byte[] readUntil(InputStream input, byte separator) throws RubyModelException, IOException{
@@ -1112,7 +1107,7 @@
byte info = (byte)input.read();
if((info & INTERFACE) != 0) {
- typeHierarchy.addInterface(element);
+ typeHierarchy.addModule(element);
}
if((info & COMPUTED_FOR) != 0) {
if(!element.equals(type)) {
@@ -1166,7 +1161,7 @@
superInterfaces[interfaceCount++] = types[new Integer(new String(b2)).intValue()];
System.arraycopy(superInterfaces, 0, superInterfaces = new IType[interfaceCount], 0, interfaceCount);
- typeHierarchy.cacheSuperInterfaces(
+ typeHierarchy.cacheSuperModules(
types[subClass],
superInterfaces);
}
@@ -1290,7 +1285,7 @@
hashtable2.put(index, superClass);
}
}
- types = this.typeToSuperInterfaces.keySet().toArray();
+ types = this.typeToSuperModules.keySet().toArray();
for (int i = 0; i < types.length; i++) {
Object t = types[i];
if(hashtable.get(t) == null) {
@@ -1298,7 +1293,7 @@
hashtable.put(t, index);
hashtable2.put(index, t);
}
- Object[] sp = (Object[])this.typeToSuperInterfaces.get(t);
+ Object[] sp = (Object[])this.typeToSuperModules.get(t);
if(sp != null) {
for (int j = 0; j < sp.length; j++) {
Object superInterface = sp[j];
@@ -1349,7 +1344,7 @@
if(this.focusType != null && this.focusType.equals(t)) {
info |= COMPUTED_FOR;
}
- if(this.interfaces.contains(t)) {
+ if(this.modules.contains(t)) {
info |= INTERFACE;
}
if(this.rootClasses.contains(t)) {
@@ -1373,10 +1368,10 @@
output.write(SEPARATOR1);
// save superinterfaces
- types = this.typeToSuperInterfaces.keySet().toArray();
+ types = this.typeToSuperModules.keySet().toArray();
for (int i = 0; i < types.length; i++) {
IRubyElement key = (IRubyElement)types[i];
- IRubyElement[] values = (IRubyElement[])this.typeToSuperInterfaces.get(key);
+ IRubyElement[] values = (IRubyElement[])this.typeToSuperModules.get(key);
if(values.length > 0) {
output.write(((Integer)hashtable.get(key)).toString().getBytes());
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java 2007-08-22 21:05:06 UTC (rev 3047)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/parser/RubyParser.java 2007-08-22 21:05:16 UTC (rev 3048)
@@ -26,7 +26,7 @@
import org.jruby.lexer.yacc.LexerSource;
import org.jruby.lexer.yacc.SyntaxException;
import org.jruby.parser.DefaultRubyParser;
-import org.jruby.parser.RubyParserConfiguration;
+import org.jruby.parser.ParserConfiguration;
import org.jruby.parser.RubyParserPool;
import org.jruby.parser.RubyParserResult;
import org.rubypeople.rdt.core.RubyCore;
@@ -60,8 +60,9 @@
parser.setWarnings(warnings);
String fileName = "";
if (file != null) fileName = file.getName();
- LexerSource lexerSource = new LexerSource(fileName, content, 0, true);
- result = parser.parse(new RubyParserConfiguration(false), lexerSource);
+ ParserConfiguration config = new ParserConfiguration(0, true, false);
+ LexerSource lexerSource = LexerSource.getSource(fileName, content, null, config);
+ result = parser.parse(config, lexerSource);
} catch (SyntaxException e) {
throw e;
} finally {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|