protected void check(final Identifier identifier, final String description, Problems problems) { String displayName = identifier.getDisplayName(); if (VISIBILITY_PATTERN.matcher(displayName).matches()) { String msg = MessageFormat.format(REPORT, description, displayName); problems.report(identifier.getLocation(), msg); } }
@Override public String getText(final Object element) { Identifier identifier = null; if (element instanceof IOutlineElement) { IOutlineElement e = (IOutlineElement) element; String outlineText = e.getOutlineText(); if (outlineText.length() != 0) { return outlineText; } identifier = e.getIdentifier(); } else if (element instanceof List<?>) { return "imports"; } if (identifier == null) { return "unknown"; } return identifier.getDisplayName(); }