Revision: 2152
http://svn.sourceforge.net/rubyeclipse/?rev=2152&view=rev
Author: cawilliams
Date: 2007-03-13 11:41:12 -0700 (Tue, 13 Mar 2007)
Log Message:
-----------
Modified Paths:
--------------
branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchingNodeSet.java
Modified: branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchingNodeSet.java
===================================================================
--- branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchingNodeSet.java 2007-03-13 18:39:28 UTC (rev 2151)
+++ branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchingNodeSet.java 2007-03-13 18:41:12 UTC (rev 2152)
@@ -69,7 +69,7 @@
// remove existing node at same position from set
// (case of recovery that created the same node several time
// see http://bugs.eclipse.org/bugs/show_bug.cgi?id=29366)
- long key = (((long) node.sourceStart()) << 32) + node.sourceEnd();
+ long key = (((long) node.sourceStart()) << 32) + node.getPosition().getEndOffset();
Node existing = (Node) this.possibleMatchingNodesKeys.get(key);
if (existing != null && existing.getClass().equals(node.getClass()))
this.possibleMatchingNodesSet.remove(existing);
@@ -86,7 +86,7 @@
// remove existing node at same position from set
// (case of recovery that created the same node several time
// see http://bugs.eclipse.org/bugs/show_bug.cgi?id=29366)
- long key = (((long) node.sourceStart()) << 32) + node.sourceEnd();
+ long key = (((long) node.getPosition().getStartOffset()) << 32) + node.getPosition().getEndOffset();
Node existing = (Node) this.matchingNodesKeys.get(key);
if (existing != null && existing.getClass().equals(node.getClass()))
this.matchingNodes.removeKey(existing);
@@ -99,13 +99,13 @@
Object[] nodes = this.possibleMatchingNodesSet.values;
for (int i = 0, l = nodes.length; i < l; i++) {
Node node = (Node) nodes[i];
- if (node != null && start <= node.sourceStart() && node.sourceEnd() <= end)
+ if (node != null && start <= node.getPosition().getStartOffset() && node.getPosition().getEndOffset() <= end)
return true;
}
nodes = this.matchingNodes.keyTable;
for (int i = 0, l = nodes.length; i < l; i++) {
Node node = (Node) nodes[i];
- if (node != null && start <= node.sourceStart() && node.sourceEnd() <= end)
+ if (node != null && start <= node.getPosition().getStartOffset() && node.getPosition().getEndOffset() <= end)
return true;
}
return false;
@@ -120,7 +120,7 @@
Object[] keyTable = this.matchingNodes.keyTable;
for (int i = 0, l = keyTable.length; i < l; i++) {
Node node = (Node) keyTable[i];
- if (node != null && start <= node.sourceStart() && node.sourceEnd() <= end) {
+ if (node != null && start <= node.getPosition().getStartOffset() && node.getPosition().getEndOffset() <= end) {
if (nodes == null)
nodes = new ArrayList();
nodes.add(node);
@@ -133,7 +133,7 @@
// sort nodes by source starts
Util.Comparer comparer = new Util.Comparer() {
public int compare(Object o1, Object o2) {
- return ((Node) o1).sourceStart() - ((Node) o2).sourceStart();
+ return ((Node) o1).getPosition().getStartOffset() - ((Node) o2).getPosition().getStartOffset();
}
};
Util.sort(result, comparer);
@@ -141,7 +141,7 @@
}
public Object removePossibleMatch(Node node) {
- long key = (((long) node.sourceStart()) << 32) + node.sourceEnd();
+ long key = (((long) node.getPosition().getStartOffset()) << 32) + node.getPosition().getEndOffset();
Node existing = (Node) this.possibleMatchingNodesKeys.get(key);
if (existing == null)
return null;
@@ -150,7 +150,7 @@
}
public Object removeTrustedMatch(Node node) {
- long key = (((long) node.sourceStart()) << 32) + node.sourceEnd();
+ long key = (((long) node.getPosition().getStartOffset()) << 32) + node.getPosition().getEndOffset();
Node existing = (Node) this.matchingNodesKeys.get(key);
if (existing == null)
return null;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|