1 /******************************************************************************* 2 * Copyright (c) 2000, 2020 IBM Corporation and others. 3 * 4 * This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * https://www.eclipse.org/legal/epl-2.0/ 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 * 11 * Contributors: 12 * IBM Corporation - initial API and implementation 13 *******************************************************************************/ 14 package org.eclipse.jdt.internal.codeassist; 15 16 public interface RelevanceConstants { 17 18 19 /* 20 * Important: The following rules must be strictly adhered to while declaring new relevance constants or modifying the existing: 21 * 1. One or more relevance constants are used in combination to form a relevance. 22 * 2. A particular relevance constant can be added only once to form a relevance. 23 * 3. A resultant relevance (after combining all the applicable relevance constants) must be a positive number. 24 * 4. The value of R_DEFAULT is maintained at a positive value such that the sum of all the negative relevance constants 25 * and R_DEFAULT must not be negative. 26 */ 27 int R_DEFAULT = 30; 28 int R_INTERESTING = 5; 29 int R_CASE = 10; 30 int R_CAMEL_CASE = 5; 31 int R_EXACT_NAME = 4; 32 int R_VOID = -5; 33 int R_EXPECTED_TYPE = 20; 34 int R_EXACT_EXPECTED_TYPE = 30; 35 int R_INTERFACE = 20; 36 int R_CLASS = 20; 37 int R_ENUM = 20; 38 int R_ANNOTATION = 20; 39 int R_EXCEPTION = 20; 40 int R_ENUM_CONSTANT = 5; 41 int R_ABSTRACT_METHOD = 20; 42 int R_NON_STATIC = 11; 43 int R_UNQUALIFIED = 3; 44 int R_QUALIFIED = 2; 45 int R_NAME_FIRST_PREFIX = 6; 46 int R_NAME_PREFIX = 5; 47 int R_NAME_FIRST_SUFFIX = 4; 48 int R_NAME_SUFFIX = 3; 49 int R_NAME_LESS_NEW_CHARACTERS = 15; 50 int R_SUBSTRING = -21; 51 int R_SUBWORD = -22; 52 int R_METHOD_OVERIDE = 3; 53 int R_NON_RESTRICTED = 3; 54 int R_TRUE_OR_FALSE = 1; 55 int R_INLINE_TAG = 31; 56 int R_VALUE_TAG = 31; 57 int R_NON_INHERITED = 2; 58 int R_NO_PROBLEMS = 1; 59 int R_RESOLVED = 1; 60 int R_TARGET = 5; 61 int R_FINAL = 3; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=195346 62 int R_CONSTRUCTOR = 3; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=373409 63 int R_MODULE_DECLARATION = 31; 64 } 65