Package org.eclipse.wst.sse.ui.internal.contentassist

Examples of org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal


  public int compare(Object o1, Object o2) {
    int relevance = 0;
    if ((o1 instanceof IRelevanceCompletionProposal) && (o2 instanceof IRelevanceCompletionProposal)) {
      // sort based on relevance
      IRelevanceCompletionProposal cp1 = (IRelevanceCompletionProposal) o1;
      IRelevanceCompletionProposal cp2 = (IRelevanceCompletionProposal) o2;

      relevance = cp2.getRelevance() - cp1.getRelevance();

      // if same relevance, secondary sort (lexigraphically)
      if ((relevance == 0) && (o1 instanceof ICompletionProposal) && (o2 instanceof ICompletionProposal)) {
        String displayString1 = ((ICompletionProposal) o1).getDisplayString();
        String displayString2 = ((ICompletionProposal) o2).getDisplayString();
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.