private CollationKeyICU(CollationKey icuCollKey) { super(icuCollKey.getSourceString()); fIcuCollKey = icuCollKey; }
@Override public String getSourceString() { return fIcuCollKey.getSourceString(); }
@Override Object getAttributeValue(String attribute) { Object value = getCache().get(attribute); if(value == null) { value = markerDelta.getAttribute(attribute); if(value != null) { getCache().put(attribute, value); } } if (value instanceof CollationKey) return ((CollationKey) value).getSourceString(); return value; }
@Override public String getLocation() { if(stale||checkIfMarkerStale()){ return MarkerSupportInternalUtilities.UNKNOWN_ATRRIBTE_VALUE_STRING; } if (getCache().containsKey(LOCATION_STRING)) { Object value = getCache().get(LOCATION_STRING); if (value instanceof CollationKey) { return ((CollationKey) value).getSourceString(); } return (String) value; } // Is the location override set? String locationString = getAttributeValue(IMarker.LOCATION, MarkerSupportInternalUtilities.EMPTY_STRING); if (locationString.length() > 0) { getCache().put(LOCATION_STRING, locationString); return locationString; } // No override so use line number int lineNumber = getAttributeValue(IMarker.LINE_NUMBER, -1); String lineNumberString; if (lineNumber < 0) { lineNumberString = MarkerMessages.Unknown; } else { lineNumberString = NLS.bind(MarkerMessages.label_lineNumber, Integer.toString(lineNumber)); } getCache().put(LOCATION_STRING, lineNumberString); return lineNumberString; }
/** * Return the Object that is the marker value for attribute. Return null if * it is not found. * * @param attribute * @return Object or <code>null</code> */ Object getAttributeValue(String attribute) { Object value = getCache().get(attribute); if(value == null) { if(stale){ return value; } try { value = marker.getAttribute(attribute); } catch (CoreException e) { checkIfMarkerStale() ; value = null; } if(value != null) { getCache().put(attribute, value); } } if (value instanceof CollationKey) { return ((CollationKey) value).getSourceString(); } return value; }