|
From: <caw...@us...> - 2007-07-17 16:42:40
|
Revision: 2772
http://svn.sourceforge.net/rubyeclipse/?rev=2772&view=rev
Author: cawilliams
Date: 2007-07-17 09:42:38 -0700 (Tue, 17 Jul 2007)
Log Message:
-----------
fix broken code
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/Messages.java
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/messages.properties
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java 2007-07-17 16:17:07 UTC (rev 2771)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyProject.java 2007-07-17 16:42:38 UTC (rev 2772)
@@ -46,6 +46,7 @@
import org.rubypeople.rdt.core.ILoadpathContainer;
import org.rubypeople.rdt.core.ILoadpathEntry;
import org.rubypeople.rdt.core.IParent;
+import org.rubypeople.rdt.core.IRegion;
import org.rubypeople.rdt.core.IRubyElement;
import org.rubypeople.rdt.core.IRubyModelMarker;
import org.rubypeople.rdt.core.IRubyModelStatus;
@@ -55,6 +56,7 @@
import org.rubypeople.rdt.core.ISourceFolder;
import org.rubypeople.rdt.core.ISourceFolderRoot;
import org.rubypeople.rdt.core.IType;
+import org.rubypeople.rdt.core.ITypeHierarchy;
import org.rubypeople.rdt.core.RubyCore;
import org.rubypeople.rdt.core.RubyModelException;
import org.rubypeople.rdt.core.WorkingCopyOwner;
@@ -2459,4 +2461,33 @@
protected char getHandleMementoDelimiter() {
return JEM_RUBYPROJECT;
}
+
+ /**
+ * @see IRubyProject
+ */
+ public ITypeHierarchy newTypeHierarchy(
+ IRegion region,
+ IProgressMonitor monitor)
+ throws RubyModelException {
+ return newTypeHierarchy(region, DefaultWorkingCopyOwner.PRIMARY, monitor);
+ }
+
+ /**
+ * @see IJavaProject
+ */
+ public ITypeHierarchy newTypeHierarchy(
+ IRegion region,
+ WorkingCopyOwner owner,
+ IProgressMonitor monitor)
+ throws RubyModelException {
+
+ if (region == null) {
+ throw new IllegalArgumentException(Messages.hierarchy_nullRegion);
+ }
+ IRubyScript[] workingCopies = RubyModelManager.getRubyModelManager().getWorkingCopies(owner, true/*add primary working copies*/);
+ CreateTypeHierarchyOperation op =
+ new CreateTypeHierarchyOperation(region, workingCopies, null, true);
+ op.runOperation(monitor);
+ return op.getResult();
+ }
}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/Messages.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/Messages.java 2007-07-17 16:17:07 UTC (rev 2771)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/Messages.java 2007-07-17 16:42:38 UTC (rev 2772)
@@ -163,6 +163,7 @@
public static String engine_searching;
public static String hierarchy_creating;
public static String hierarchy_creatingOnType;
+ public static String hierarchy_nullRegion;
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/messages.properties
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/messages.properties 2007-07-17 16:17:07 UTC (rev 2771)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/util/messages.properties 2007-07-17 16:42:38 UTC (rev 2772)
@@ -9,8 +9,10 @@
# IBM Corporation - initial API and implementation
###############################################################################
-### JavaModel messages_
+### RubyModel messages_
+hierarchy_nullRegion= Region cannot be null
+
### ruby element
element_doesNotExist = {0} does not exist
element_notOnClasspath = {0} is not on its project's build path
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|