Package org.springframework.ide.eclipse.aop.ui.navigator.model

Examples of org.springframework.ide.eclipse.aop.ui.navigator.model.IRevealableReferenceNode


  }
 
  @Override
  public String getDescription(Object element) {
    if (element instanceof IRevealableReferenceNode) {
      IRevealableReferenceNode node = (IRevealableReferenceNode) element;
      if (node.getResource() != null) {
        return node.getResource().getName()
            + " - "
            + node.getResource().getFullPath().toString()
                .substring(1);
      }
    }
    return super.getDescription(element);
  }
View Full Code Here


  @Override
  public int compare(Viewer viewer, Object e1, Object e2) {
    if (e1 instanceof IRevealableReferenceNode
        && e2 instanceof IRevealableReferenceNode) {
      IRevealableReferenceNode ref1 = (IRevealableReferenceNode) e1;
      IRevealableReferenceNode ref2 = (IRevealableReferenceNode) e2;
      if (ref1.getResource() != null
          && ref1.getResource().equals(ref2.getResource())) {
        int l1 = ref1.getLineNumber();
        int l2 = ref2.getLineNumber();
        if (l1 < l2) {
          return -1;
        }
        else if (l1 == l2) {
          return 0;
        }
        else if (l1 > l2) {
          return 1;
        }
      }
      else {
        super.compare(viewer, ref1.getResource(), ref2.getResource());
      }
    }
    return super.compare(viewer, e1, e2);
  }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.aop.ui.navigator.model.IRevealableReferenceNode

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.