|
From: <caw...@us...> - 2007-03-13 18:42:20
|
Revision: 2153
http://svn.sourceforge.net/rubyeclipse/?rev=2153&view=rev
Author: cawilliams
Date: 2007-03-13 11:42:18 -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
branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/PatternLocator.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:41:12 UTC (rev 2152)
+++ branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/MatchingNodeSet.java 2007-03-13 18:42:18 UTC (rev 2153)
@@ -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.getPosition().getEndOffset();
+ long key = (((long) node.getPosition().getStartOffset()) << 32) + node.getPosition().getEndOffset();
Node existing = (Node) this.possibleMatchingNodesKeys.get(key);
if (existing != null && existing.getClass().equals(node.getClass()))
this.possibleMatchingNodesSet.remove(existing);
Modified: branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/PatternLocator.java
===================================================================
--- branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/PatternLocator.java 2007-03-13 18:41:12 UTC (rev 2152)
+++ branches/search_engine/org.rubypeople.rdt.core/src/org/rubypeople/rdt/internal/core/search/matching/PatternLocator.java 2007-03-13 18:42:18 UTC (rev 2153)
@@ -5,6 +5,23 @@
public class PatternLocator {
+ /* match levels */
+ public static final int IMPOSSIBLE_MATCH = 0;
+ public static final int INACCURATE_MATCH = 1;
+ public static final int POSSIBLE_MATCH = 2;
+ public static final int ACCURATE_MATCH = 3;
+ public static final int ERASURE_MATCH = 4;
+
+// Possible rule match flavors
+// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=79866
+ protected static final int POSSIBLE_FULL_MATCH = POSSIBLE_MATCH | (SearchPattern.R_FULL_MATCH<<16);
+ protected static final int POSSIBLE_PREFIX_MATCH = POSSIBLE_MATCH | (SearchPattern.R_PREFIX_MATCH<<16);
+ protected static final int POSSIBLE_PATTERN_MATCH = POSSIBLE_MATCH | (SearchPattern.R_PATTERN_MATCH<<16);
+ protected static final int POSSIBLE_REGEXP_MATCH = POSSIBLE_MATCH | (SearchPattern.R_REGEXP_MATCH<<16);
+ protected static final int POSSIBLE_CAMELCASE_MATCH = POSSIBLE_MATCH | (SearchPattern.R_CAMELCASE_MATCH<<16);
+ protected static final int NODE_SET_MASK = 0xFF;
+ protected static final int POSSIBLE_MATCH_MASK = ~NODE_SET_MASK;
+
/* match container */
public static final int COMPILATION_UNIT_CONTAINER = 1;
public static final int CLASS_CONTAINER = 2;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|