Example usage for org.eclipse.jdt.internal.compiler.util ObjectVector find

List of usage examples for org.eclipse.jdt.internal.compiler.util ObjectVector find

Introduction

In this page you can find the example usage for org.eclipse.jdt.internal.compiler.util ObjectVector find.

Prototype

public Object find(Object element) 

Source Link

Usage

From source file:com.codenvy.ide.ext.java.server.internal.core.search.matching.PossibleMatchSet.java

License:Open Source License

public void add(PossibleMatch possibleMatch) {
    IPath path = possibleMatch.openable.getPackageFragmentRoot().getPath();
    ObjectVector possibleMatches = (ObjectVector) this.rootsToPossibleMatches.get(path);
    if (possibleMatches != null) {
        PossibleMatch storedMatch = (PossibleMatch) possibleMatches.find(possibleMatch);
        if (storedMatch != null) {
            while (storedMatch.getSimilarMatch() != null) {
                storedMatch = storedMatch.getSimilarMatch();
            }//from w  w  w. j a va 2 s. c  om
            storedMatch.setSimilarMatch(possibleMatch);
            return;
        }
    } else {
        this.rootsToPossibleMatches.put(path, possibleMatches = new ObjectVector());
    }

    possibleMatches.add(possibleMatch);
    this.elementCount++;
}