Java 类com.intellij.psi.ForceableComparable 实例源码

项目:intellij-ce-playground    文件:CachingComparingClassifier.java   
@Override
public void addElement(LookupElement t, ProcessingContext context) {
  Comparable weight = myWeigher.weigh(t, context.get(CompletionLookupArranger.WEIGHING_CONTEXT));
  if (weight instanceof ForceableComparable) {
    ((ForceableComparable)weight).force();
  }
  if (!myWeigher.isPrefixDependent() && myPrimitive) {
    if (myFirstWeight == null) {
      myFirstWeight = Ref.create(weight);
    } else if (!Comparing.equal(myFirstWeight.get(), weight)) {
      myPrimitive = false;
    }
  }
  myWeights.put(t, weight);
  super.addElement(t, context);
}
项目:tools-idea    文件:CachingComparingClassifier.java   
@Override
public void addElement(LookupElement t) {
  Comparable weight = myWeigher.weigh(t);
  if (weight instanceof ForceableComparable) {
    ((ForceableComparable)weight).force();
  }
  if (!myWeigher.isPrefixDependent() && myPrimitive) {
    if (myFirstWeight == null) {
      myFirstWeight = Ref.create(weight);
    } else if (!Comparing.equal(myFirstWeight.get(), weight)) {
      myPrimitive = false;
    }
  }
  myWeights.put(t, weight);
  super.addElement(t);
}
项目:consulo    文件:CachingComparingClassifier.java   
@Override
public void addElement(@Nonnull LookupElement t, @Nonnull ProcessingContext context) {
  Comparable weight = myWeigher.weigh(t, context.get(CompletionLookupArranger.WEIGHING_CONTEXT));
  if (weight instanceof ForceableComparable) {
    ((ForceableComparable)weight).force();
  }
  if (!myWeigher.isPrefixDependent() && myPrimitive) {
    if (myFirstWeight == null) {
      myFirstWeight = Ref.create(weight);
    } else if (!Comparing.equal(myFirstWeight.get(), weight)) {
      myPrimitive = false;
    }
  }
  myWeights.put(t, weight);
  super.addElement(t, context);
}
项目:intellij-ce-playground    文件:NegatingComparable.java   
@Override
public void force() {
  if (myWeigh instanceof ForceableComparable) {
    ((ForceableComparable)myWeigh).force();
  }
}
项目:tools-idea    文件:NegatingComparable.java   
@Override
public void force() {
  if (myWeigh instanceof ForceableComparable) {
    ((ForceableComparable)myWeigh).force();
  }
}
项目:consulo    文件:NegatingComparable.java   
@Override
public void force() {
  if (myWeigh instanceof ForceableComparable) {
    ((ForceableComparable)myWeigh).force();
  }
}