congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
QualifiedTypeNameHistory.getNormalizedPosition
Code IndexAdd Tabnine to your IDE (free)

How to use
getNormalizedPosition
method
in
org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory

Best Java code snippets using org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.getNormalizedPosition (Showing top 6 results out of 315)

origin: org.eclipse.jdt/org.eclipse.jdt.ui

public static int getBoost(String fullyQualifiedTypeName, int min, int max) {
  float position= getDefault().getNormalizedPosition(fullyQualifiedTypeName);
  int dist= max - min;
  return Math.round(position * dist) + min;
}
origin: org.eclipse/org.eclipse.jdt.ui

public static int getBoost(String fullyQualifiedTypeName, int min, int max) {
  float position= getDefault().getNormalizedPosition(fullyQualifiedTypeName);
  int dist= max - min;
  return Math.round(position * dist) + min;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

public static int getBoost(String fullyQualifiedTypeName, int min, int max) {
  float position= getDefault().getNormalizedPosition(fullyQualifiedTypeName);
  int dist= max - min;
  return Math.round(position * dist) + min;
}
origin: org.eclipse/org.eclipse.jdt.ui

protected int computeRelevance() {
  /*
   * There are two histories: the RHS history remembers types used for the current expected
   * type (left hand side), while the type history remembers recently used types in general).
   * 
   * The presence of an RHS ranking is a much more precise sign for relevance as it proves the
   * subtype relationship between the proposed type and the expected type.
   * 
   * The "recently used" factor (of either the RHS or general history) is less important, it should
   * not override other relevance factors such as if the type is already imported etc.
   */
  float rhsHistoryRank= fInvocationContext.getHistoryRelevance(getQualifiedTypeName());
  float typeHistoryRank= QualifiedTypeNameHistory.getDefault().getNormalizedPosition(getQualifiedTypeName());
  int recencyBoost= Math.round((rhsHistoryRank + typeHistoryRank) * 5);
  int rhsBoost= rhsHistoryRank > 0.0f ? 50 : 0;
  int baseRelevance= super.computeRelevance();
  
  return baseRelevance +  rhsBoost + recencyBoost;
}

origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
protected int computeRelevance() {
  /*
   * There are two histories: the RHS history remembers types used for the current expected
   * type (left hand side), while the type history remembers recently used types in general).
   *
   * The presence of an RHS ranking is a much more precise sign for relevance as it proves the
   * subtype relationship between the proposed type and the expected type.
   *
   * The "recently used" factor (of either the RHS or general history) is less important, it should
   * not override other relevance factors such as if the type is already imported etc.
   */
  float rhsHistoryRank= fInvocationContext.getHistoryRelevance(getQualifiedTypeName());
  float typeHistoryRank= QualifiedTypeNameHistory.getDefault().getNormalizedPosition(getQualifiedTypeName());
  int recencyBoost= Math.round((rhsHistoryRank + typeHistoryRank) * 5);
  int rhsBoost= rhsHistoryRank > 0.0f ? 50 : 0;
  int baseRelevance= super.computeRelevance();
  return baseRelevance +  rhsBoost + recencyBoost;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected int computeRelevance() {
  /*
   * There are two histories: the RHS history remembers types used for the current expected
   * type (left hand side), while the type history remembers recently used types in general).
   *
   * The presence of an RHS ranking is a much more precise sign for relevance as it proves the
   * subtype relationship between the proposed type and the expected type.
   *
   * The "recently used" factor (of either the RHS or general history) is less important, it should
   * not override other relevance factors such as if the type is already imported etc.
   */
  float rhsHistoryRank= fInvocationContext.getHistoryRelevance(getQualifiedTypeName());
  float typeHistoryRank= QualifiedTypeNameHistory.getDefault().getNormalizedPosition(getQualifiedTypeName());
  int recencyBoost= Math.round((rhsHistoryRank + typeHistoryRank) * 5);
  int rhsBoost= rhsHistoryRank > 0.0f ? 50 : 0;
  int baseRelevance= super.computeRelevance();
  return baseRelevance +  rhsBoost + recencyBoost;
}
org.eclipse.jdt.internal.corext.utilQualifiedTypeNameHistorygetNormalizedPosition

Popular methods of QualifiedTypeNameHistory

  • getBoost
  • getDefault
  • remember
  • <init>
  • accessed
  • load
  • save

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Kernel (java.awt.image)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now