|
From: <caw...@us...> - 2007-05-08 14:13:37
|
Revision: 2449
http://svn.sourceforge.net/rubyeclipse/?rev=2449&view=rev
Author: cawilliams
Date: 2007-05-08 07:13:35 -0700 (Tue, 08 May 2007)
Log Message:
-----------
rename RubyLocalVar to LocalVariable
Modified Paths:
--------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java
Added Paths:
-----------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/LocalVariable.java
Removed Paths:
-------------
trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyLocalVar.java
Copied: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/LocalVariable.java (from rev 2395, trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyLocalVar.java)
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/LocalVariable.java (rev 0)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/LocalVariable.java 2007-05-08 14:13:35 UTC (rev 2449)
@@ -0,0 +1,84 @@
+/*
+ * Author: C.Williams
+ *
+ * Copyright (c) 2004 RubyPeople.
+ *
+ * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. You
+ * can get copy of the GPL along with further information about RubyPeople and
+ * third party software bundled with RDT in the file
+ * org.rubypeople.rdt.core_x.x.x/RDT.license or otherwise at
+ * http://www.rubypeople.org/RDT.license.
+ *
+ * RDT is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option) any later
+ * version.
+ *
+ * RDT is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * RDT; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+ * Suite 330, Boston, MA 02111-1307 USA
+ */
+package org.rubypeople.rdt.internal.core;
+
+import java.util.HashMap;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.rubypeople.rdt.internal.core.util.Util;
+
+/**
+ * @author Chris
+ *
+ */
+public class LocalVariable extends RubyField {
+
+ private int start;
+ private int end;
+
+ /**
+ * @param name
+ */
+ public LocalVariable(RubyElement parent, String name, int start, int end) {
+ super(parent, name);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.rubypeople.rdt.internal.core.parser.RubyElement#getElementType()
+ */
+ public int getElementType() {
+ return RubyElement.LOCAL_VARIABLE;
+ }
+
+ protected Object createElementInfo() {
+ // a local variable has no info
+ return null;
+ }
+
+ public IResource getCorrespondingResource() {
+ return null;
+ }
+
+ public int hashCode() {
+ return Util.combineHashCodes(this.parent.hashCode(), this.start);
+ }
+
+ public boolean equals(Object o) {
+ if (!(o instanceof LocalVariable)) return false;
+ LocalVariable other = (LocalVariable)o;
+ return
+ this.start == other.start
+ && this.end == other.end
+ && super.equals(o);
+ }
+
+ protected void generateInfos(Object info, HashMap newElements, IProgressMonitor pm) {
+ // a local variable has no info
+ }
+
+}
Property changes on: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/LocalVariable.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Deleted: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyLocalVar.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyLocalVar.java 2007-05-08 14:12:51 UTC (rev 2448)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyLocalVar.java 2007-05-08 14:13:35 UTC (rev 2449)
@@ -1,84 +0,0 @@
-/*
- * Author: C.Williams
- *
- * Copyright (c) 2004 RubyPeople.
- *
- * This file is part of the Ruby Development Tools (RDT) plugin for eclipse. You
- * can get copy of the GPL along with further information about RubyPeople and
- * third party software bundled with RDT in the file
- * org.rubypeople.rdt.core_x.x.x/RDT.license or otherwise at
- * http://www.rubypeople.org/RDT.license.
- *
- * RDT is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * RDT is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
- * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * RDT; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
- * Suite 330, Boston, MA 02111-1307 USA
- */
-package org.rubypeople.rdt.internal.core;
-
-import java.util.HashMap;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.rubypeople.rdt.internal.core.util.Util;
-
-/**
- * @author Chris
- *
- */
-public class RubyLocalVar extends RubyField {
-
- private int start;
- private int end;
-
- /**
- * @param name
- */
- public RubyLocalVar(RubyElement parent, String name, int start, int end) {
- super(parent, name);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.rubypeople.rdt.internal.core.parser.RubyElement#getElementType()
- */
- public int getElementType() {
- return RubyElement.LOCAL_VARIABLE;
- }
-
- protected Object createElementInfo() {
- // a local variable has no info
- return null;
- }
-
- public IResource getCorrespondingResource() {
- return null;
- }
-
- public int hashCode() {
- return Util.combineHashCodes(this.parent.hashCode(), this.start);
- }
-
- public boolean equals(Object o) {
- if (!(o instanceof RubyLocalVar)) return false;
- RubyLocalVar other = (RubyLocalVar)o;
- return
- this.start == other.start
- && this.end == other.end
- && super.equals(o);
- }
-
- protected void generateInfos(Object info, HashMap newElements, IProgressMonitor pm) {
- // a local variable has no info
- }
-
-}
Modified: trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java
===================================================================
--- trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java 2007-05-08 14:12:51 UTC (rev 2448)
+++ trunk/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/RubyScriptStructureBuilder.java 2007-05-08 14:13:35 UTC (rev 2449)
@@ -201,13 +201,13 @@
} else {
int start = field.declarationStart - field.name.length() + 1;
int end = start + field.name.length();
- handle = new RubyLocalVar(modelStack.peek(), field.name, start, end);
+ handle = new LocalVariable(modelStack.peek(), field.name, start, end);
}
modelStack.push(handle);
// Add to enclosing type
RubyElementInfo parentInfo;
- if (handle instanceof RubyLocalVar) {
+ if (handle instanceof LocalVariable) {
parentInfo = infoStack.peek();
} else if (handle instanceof RubyGlobal){
parentInfo = scriptInfo; // FIXME Grab the project info?
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|