public static int getAPIToolPreferenceTab(int id) { int category = ApiProblemFactory.getProblemCategory(id); int tab = -1; if (category == IApiProblem.CATEGORY_USAGE) { tab = 0; int problemKind = ApiProblemFactory.getProblemKind(id); switch (problemKind) { case IApiProblem.UNUSED_PROBLEM_FILTERS: return 3; default: break; } } if (category == IApiProblem.CATEGORY_COMPATIBILITY) { tab = 1; } if (category == IApiProblem.CATEGORY_SINCETAGS || category == IApiProblem.CATEGORY_VERSION) { tab = 2; } if (category == IApiProblem.CATEGORY_API_COMPONENT_RESOLUTION) { tab = 3; } if (category == IApiProblem.CATEGORY_API_USE_SCAN_PROBLEM) { tab = 4; } return tab; }
public static String getSinceVersionTagPrefererenceKey(int id) { int problemCategory = ApiProblemFactory.getProblemCategory(id); int problemKind = ApiProblemFactory.getProblemKind(id); switch (problemCategory) {
protected String resolveCategoryName() { if (fCategory == null) { int problemid = fBackingMarker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, -1); int category = ApiProblemFactory.getProblemCategory(problemid); switch (category) { case IApiProblem.CATEGORY_COMPATIBILITY: {
if(fCategory == null) { int problemid = fBackingMarker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, -1); int category = ApiProblemFactory.getProblemCategory(problemid); switch(category) { case IApiProblem.CATEGORY_COMPATIBILITY: {
if (fCategory == null) { int problemid = fBackingMarker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, -1); int category = ApiProblemFactory.getProblemCategory(problemid); switch (category) { case IApiProblem.CATEGORY_COMPATIBILITY: {
/** * Convenience method to get the message id from a problem id * * @param problemid * @return the message id to use for the given problem id */ public static int getProblemMessageId(int problemid) { return getProblemMessageId(getProblemCategory(problemid), getProblemElementKind(problemid), getProblemKind(problemid), getProblemFlags(problemid)); }
public static String getAPIToolPreferenceKey(int id) { String key = null; int category = ApiProblemFactory.getProblemCategory(id); if (category == IApiProblem.CATEGORY_USAGE) { key = Util.getUsagePrefererenceKey(id); } if (category == IApiProblem.CATEGORY_COMPATIBILITY) { key = Util.getDeltaPrefererenceKey(ApiProblemFactory.getProblemElementKind(id), ApiProblemFactory.getProblemKind(id), ApiProblemFactory.getProblemFlags(id)); } if (category == IApiProblem.CATEGORY_SINCETAGS || category == IApiProblem.CATEGORY_VERSION) { key = Util.getSinceVersionTagPrefererenceKey(id); } if (category == IApiProblem.CATEGORY_API_COMPONENT_RESOLUTION) { key = Util.getComponentResolutionKey(id); } if (category == IApiProblem.CATEGORY_API_USE_SCAN_PROBLEM) { key = Util.getAPIUseScanKey(id); } return key; }