* markers.
*/
class StorageInputDocumentProvider extends StorageDocumentProvider implements IElementStateListener {
protected IAnnotationModel createAnnotationModel(Object element) throws CoreException {
IAnnotationModel model = null;
IStorageEditorInput storageInput = (IStorageEditorInput) element;
String ext = BreakpointRulerAction.getFileExtension(storageInput);
IContentType[] types = getEditorInputContentTypes(storageInput);
IResource res = null;
for (int i = 0; res == null && i < types.length; i++) {
res = BreakpointProviderBuilder.getInstance().getResource(storageInput, types[i].getId(), ext);
}
String id = storageInput.getName();
if (storageInput.getStorage() != null) {
IPath fullPath = storageInput.getStorage().getFullPath();
if (fullPath != null)
id = fullPath.toString();
else
id = storageInput.getName();
}
if (res != null)
model = new StructuredResourceMarkerAnnotationModel(res, id);
else
model = new StructuredResourceMarkerAnnotationModel(ResourcesPlugin.getWorkspace().getRoot(), id);