public static String getComponentResolutionKey(int id) { int problemKind = ApiProblemFactory.getProblemKind(id); switch (problemKind) { case IApiProblem.API_COMPONENT_RESOLUTION: return IApiProblemTypes.REPORT_RESOLUTION_ERRORS_API_COMPONENT; case IApiProblem.UNUSED_PROBLEM_FILTERS: return IApiProblemTypes.UNUSED_PROBLEM_FILTERS; default: break; } return null; }
public static String getAPIUseScanKey(int id) { int problemKind = ApiProblemFactory.getProblemKind(id); switch (problemKind) { case IApiProblem.API_USE_SCAN_TYPE_PROBLEM: return IApiProblemTypes.API_USE_SCAN_TYPE_SEVERITY; case IApiProblem.API_USE_SCAN_METHOD_PROBLEM: return IApiProblemTypes.API_USE_SCAN_METHOD_SEVERITY; case IApiProblem.API_USE_SCAN_FIELD_PROBLEM: return IApiProblemTypes.API_USE_SCAN_FIELD_SEVERITY; default: break; } return null; }
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) { case IApiProblem.CATEGORY_SINCETAGS: {
public SinceTagResolution(IMarker marker) { this.kind = ApiProblemFactory.getProblemKind(marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, 0)); this.newVersionValue = marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_VERSION, null); }
public SinceTagResolution(IMarker marker) { this.kind = ApiProblemFactory.getProblemKind(marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, 0)); this.newVersionValue = (String) marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_VERSION, null); } /* (non-Javadoc)
public static String getUsagePrefererenceKey(int id) { int problemKind = ApiProblemFactory.getProblemKind(id); int problemFlag = ApiProblemFactory.getProblemFlags(id);
public VersionNumberingResolution(IMarker marker) { this.newVersionValue = marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_VERSION, null); this.kind = ApiProblemFactory.getProblemKind(marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, 0)); this.description = marker.getAttribute(IApiMarkerConstants.VERSION_NUMBERING_ATTR_DESCRIPTION, null); }
public VersionNumberingResolution(IMarker marker) { this.newVersionValue = marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_VERSION, null); this.kind = ApiProblemFactory.getProblemKind(marker.getAttribute(IApiMarkerConstants.MARKER_ATTR_PROBLEM_ID, 0)); this.description = marker.getAttribute(IApiMarkerConstants.VERSION_NUMBERING_ATTR_DESCRIPTION, null); }
/** * 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; }
case IApiMarkerConstants.API_USAGE_MARKER_ID : { int id = ApiProblemFactory.getProblemId(marker); if(id > -1 && ApiProblemFactory.getProblemKind(id) == IApiProblem.MISSING_EE_DESCRIPTIONS) { return new IMarkerResolution[] {installEEResolution, eeResolution};
case IApiMarkerConstants.API_USAGE_MARKER_ID: { int id = ApiProblemFactory.getProblemId(marker); if (id > -1 && ApiProblemFactory.getProblemKind(id) == IApiProblem.MISSING_EE_DESCRIPTIONS) { return new IMarkerResolution[] { installEEResolution, new ConfigureProblemSeverityForAPIToolsResolution(marker) };