|
From: Christopher W. <caw...@us...> - 2006-03-30 02:58:36
|
Update of /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26415/src/org/rubypeople/rdt/internal/corext/util Modified Files: RubyModelUtil.java Log Message: add toOriginal method Index: RubyModelUtil.java =================================================================== RCS file: /cvsroot/rubyeclipse/org.rubypeople.rdt.ui/src/org/rubypeople/rdt/internal/corext/util/RubyModelUtil.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RubyModelUtil.java 17 Feb 2006 20:25:21 -0000 1.2 --- RubyModelUtil.java 30 Mar 2006 02:58:30 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- package org.rubypeople.rdt.internal.corext.util; + import org.rubypeople.rdt.core.IRubyElement; import org.rubypeople.rdt.core.IRubyScript; import org.rubypeople.rdt.core.RubyModelException; *************** *** 51,53 **** --- 52,62 ---- null /* no progress monitor */); } + + /** + * Returns the original element if the given element is a working copy. If the cu is already + * an original the input element is returned. The returned element might not exist + */ + public static IRubyElement toOriginal(IRubyElement element) { + return element.getPrimaryElement(); + } } |