List of usage examples for org.eclipse.jdt.core.search SearchMatch A_INACCURATE
int A_INACCURATE
To view the source code for org.eclipse.jdt.core.search SearchMatch A_INACCURATE.
Click Source Link
From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchingNodeSet.java
License:Open Source License
public int addMatch(ASTNode node, int matchLevel) { int maskedLevel = matchLevel & PatternLocator.MATCH_LEVEL_MASK; switch (maskedLevel) { case PatternLocator.INACCURATE_MATCH: if (matchLevel != maskedLevel) { addTrustedMatch(node, new Integer(SearchMatch.A_INACCURATE + (matchLevel & org.eclipse.jdt.internal.core.search.matching.PatternLocator.FLAVORS_MASK))); } else {//from w w w. j a va2 s . co m addTrustedMatch(node, POTENTIAL_MATCH); } break; case PatternLocator.POSSIBLE_MATCH: addPossibleMatch(node); break; case PatternLocator.ERASURE_MATCH: if (matchLevel != maskedLevel) { addTrustedMatch(node, new Integer(SearchPattern.R_ERASURE_MATCH + (matchLevel & PatternLocator.FLAVORS_MASK))); } else { addTrustedMatch(node, ERASURE_MATCH); } break; case PatternLocator.ACCURATE_MATCH: if (matchLevel != maskedLevel) { addTrustedMatch(node, new Integer(SearchMatch.A_ACCURATE + (matchLevel & PatternLocator.FLAVORS_MASK))); } else { addTrustedMatch(node, EXACT_MATCH); } break; } return matchLevel; }
From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.MatchingNodeSet.java
License:Open Source License
public String toString() { // TODO (jerome) should show both tables StringBuffer result = new StringBuffer(); result.append("Exact matches:"); //$NON-NLS-1$ Object[] keyTable = this.matchingNodes.keyTable; Object[] valueTable = this.matchingNodes.valueTable; for (int i = 0, l = keyTable.length; i < l; i++) { ASTNode node = (ASTNode) keyTable[i]; if (node == null) continue; result.append("\n\t"); //$NON-NLS-1$ switch (((Integer) valueTable[i]).intValue()) { case SearchMatch.A_ACCURATE: result.append("ACCURATE_MATCH: "); //$NON-NLS-1$ break; case SearchMatch.A_INACCURATE: result.append("INACCURATE_MATCH: "); //$NON-NLS-1$ break; case SearchPattern.R_ERASURE_MATCH: result.append("ERASURE_MATCH: "); //$NON-NLS-1$ break; }/*from w w w .jav a 2s . c o m*/ node.print(0, result); } result.append("\nPossible matches:"); //$NON-NLS-1$ Object[] nodes = this.possibleMatchingNodesSet.values; for (int i = 0, l = nodes.length; i < l; i++) { ASTNode node = (ASTNode) nodes[i]; if (node == null) continue; result.append("\nPOSSIBLE_MATCH: "); //$NON-NLS-1$ node.print(0, result); } return result.toString(); }
From source file:org.eclipse.che.jdt.internal.core.search.matching.MatchingNodeSet.java
License:Open Source License
public int addMatch(ASTNode node, int matchLevel) { int maskedLevel = matchLevel & org.eclipse.jdt.internal.core.search.matching.PatternLocator.MATCH_LEVEL_MASK; switch (maskedLevel) { case org.eclipse.jdt.internal.core.search.matching.PatternLocator.INACCURATE_MATCH: if (matchLevel != maskedLevel) { addTrustedMatch(node, new Integer(SearchMatch.A_INACCURATE + (matchLevel & org.eclipse.jdt.internal.core.search.matching.PatternLocator.FLAVORS_MASK))); } else {/* ww w. j a v a 2s . c om*/ addTrustedMatch(node, POTENTIAL_MATCH); } break; case org.eclipse.jdt.internal.core.search.matching.PatternLocator.POSSIBLE_MATCH: addPossibleMatch(node); break; case org.eclipse.jdt.internal.core.search.matching.PatternLocator.ERASURE_MATCH: if (matchLevel != maskedLevel) { addTrustedMatch(node, new Integer(SearchPattern.R_ERASURE_MATCH + (matchLevel & org.eclipse.jdt.internal.core.search.matching.PatternLocator.FLAVORS_MASK))); } else { addTrustedMatch(node, ERASURE_MATCH); } break; case org.eclipse.jdt.internal.core.search.matching.PatternLocator.ACCURATE_MATCH: if (matchLevel != maskedLevel) { addTrustedMatch(node, new Integer(SearchMatch.A_ACCURATE + (matchLevel & PatternLocator.FLAVORS_MASK))); } else { addTrustedMatch(node, EXACT_MATCH); } break; } return matchLevel; }