/** * Returns whether the given marker is of the given type (either directly or indirectly). */ public static boolean isMarkerType(IMarker marker, String type) { try { return marker.isSubtypeOf(type); } catch (CoreException e) { return false; } }
/** * Returns whether the given marker is of the given type (either directly or indirectly). */ private boolean isMarkerType(IMarker marker, String type) { try { return marker.isSubtypeOf(type); } catch (CoreException e) { return false; } } }
/** * Return whether or not the marker is editable. * * @param marker * @return boolean <code>true</code> if it is editable */ public static boolean isEditable(IMarker marker) { if (marker == null) { return false; } try { return marker.isSubtypeOf(IMarker.BOOKMARK) || (marker.isSubtypeOf(IMarker.TASK) && marker .getAttribute(IMarker.USER_EDITABLE, true)); } catch (CoreException e) { return false; } }
private static boolean isProblemMarkerAnnotation(Annotation annotation) { if (!(annotation instanceof MarkerAnnotation)) return false; try { return(((MarkerAnnotation)annotation).getMarker().isSubtypeOf(IMarker.PROBLEM)); } catch (CoreException e) { return false; } }
private static boolean isProblemMarkerAnnotation(Annotation annotation) { if (!(annotation instanceof MarkerAnnotation)) return false; try { return(((MarkerAnnotation)annotation).getMarker().isSubtypeOf(IMarker.PROBLEM)); } catch (CoreException e) { return false; } }
private boolean isProblemMarkerAnnotation(final Annotation annotation) { if (!(annotation instanceof MarkerAnnotation)) return false; try { return (((MarkerAnnotation) annotation).getMarker().isSubtypeOf(IMarker.PROBLEM)); } catch (final CoreException e) { return false; } }
/** * Tells whether the given annotation stands for a problem marker. * * @param annotation the annotation * @return <code>true</code> if it is a problem marker * @since 3.4 */ private static boolean isProblemMarkerAnnotation(Annotation annotation) { if (!(annotation instanceof MarkerAnnotation)) return false; try { return(((MarkerAnnotation)annotation).getMarker().isSubtypeOf(IMarker.PROBLEM)); } catch (CoreException e) { return false; } }
/** * Tells whether the given annotation stands for a problem marker. * * @param annotation the annotation * @return <code>true</code> if it is a problem marker * @since 3.4 */ private static boolean isProblemMarkerAnnotation(Annotation annotation) { if (!(annotation instanceof MarkerAnnotation)) return false; try { return(((MarkerAnnotation)annotation).getMarker().isSubtypeOf(IMarker.PROBLEM)); } catch (CoreException e) { return false; } }
private boolean isMarkerInRange(IMarker marker, ISourceReference sourceElement) throws CoreException { if (marker.isSubtypeOf(IMarker.TEXT)) { int pos= marker.getAttribute(IMarker.CHAR_START, -1); return isInside(pos, sourceElement); } return false; }
private boolean isMarkerInRange(IMarker marker, ISourceReference sourceElement) throws CoreException { if (marker.isSubtypeOf(IMarker.TEXT)) { int pos= marker.getAttribute(IMarker.CHAR_START, -1); return isInside(pos, sourceElement); } return false; }
protected String getMarkerText(IMarker marker) { try { if (marker.exists() && marker.isSubtypeOf(IBreakpoint.BREAKPOINT_MARKER)) { return DebugUIMessages.DefaultLabelProvider_Breakpoint_1; } } catch (CoreException e) { DebugUIPlugin.log(e); } return IInternalDebugCoreConstants.EMPTY_STRING; }
private boolean isMarkerInRange(IMarker marker, ISourceReference sourceElement) throws CoreException { if (marker.isSubtypeOf(IMarker.TEXT)) { int pos= marker.getAttribute(IMarker.CHAR_START, -1); return isInside(pos, sourceElement); } return false; }
/** * Returns whether the given marker is of the given type (either directly or indirectly). * * @param marker the marker to be checked * @param type the reference type * @return <code>true</code>if maker is an instance of the reference type */ public static boolean isMarkerType(IMarker marker, String type) { if (marker != null) { try { return marker.exists() && marker.isSubtypeOf(type); } catch (CoreException x) { handleCoreException(x); } } return false; }
/** * Returns whether the given marker is of the given type (either directly or indirectly). * * @param marker the marker to be checked * @param type the reference type * @return <code>true</code>if maker is an instance of the reference type */ public static boolean isMarkerType(IMarker marker, String type) { if (marker != null) { try { return marker.exists() && marker.isSubtypeOf(type); } catch (CoreException x) { handleCoreException(x); } } return false; }
private IMarker isAnnotationInRange(IAnnotationModel model, Annotation annot, ISourceReference sourceElement) throws CoreException { if (annot instanceof MarkerAnnotation) { if (sourceElement == null || isInside(model.getPosition(annot), sourceElement)) { IMarker marker= ((MarkerAnnotation) annot).getMarker(); if (marker.exists() && marker.isSubtypeOf(IMarker.PROBLEM)) { return marker; } } } return null; }
private IMarker isAnnotationInRange(IAnnotationModel model, Annotation annot, ISourceReference sourceElement) throws CoreException { if (annot instanceof MarkerAnnotation) { if (sourceElement == null || isInside(model.getPosition(annot), sourceElement)) { IMarker marker= ((MarkerAnnotation) annot).getMarker(); if (marker.exists() && marker.isSubtypeOf(IMarker.PROBLEM)) { return marker; } } } return null; }
private IMarker isAnnotationInRange(IAnnotationModel model, Annotation annot, ISourceReference sourceElement) throws CoreException { if (annot instanceof MarkerAnnotation) { if (sourceElement == null || isInside(model.getPosition(annot), sourceElement)) { IMarker marker= ((MarkerAnnotation) annot).getMarker(); if (marker.exists() && marker.isSubtypeOf(IMarker.PROBLEM)) { return marker; } } } return null; }
@Override protected boolean canEdit(Object element) { if (element instanceof MarkerEntry) { MarkerEntry entry = (MarkerEntry) element; // Bookmarks are a special case try { if (entry.getMarker() != null && entry.getMarker().isSubtypeOf(IMarker.BOOKMARK)) return true; } catch (CoreException e) { Policy.handle(e); return false; } return entry.getAttributeValue(IMarker.USER_EDITABLE, false); } return false; }
private void testIfProblemMarker(Annotation annotation) { if (fIncludesProblemMarkerAnnotations) { return; } if (annotation instanceof JavaMarkerAnnotation) { fIncludesProblemMarkerAnnotations= ((JavaMarkerAnnotation) annotation).isProblem(); } else if (annotation instanceof MarkerAnnotation) { try { IMarker marker= ((MarkerAnnotation) annotation).getMarker(); if (!marker.exists() || marker.isSubtypeOf(IMarker.PROBLEM)) { fIncludesProblemMarkerAnnotations= true; } } catch (CoreException e) { JavaPlugin.log(e); } } }
private void testIfProblemMarker(Annotation annotation) { if (fIncludesProblemMarkerAnnotations) { return; } if (annotation instanceof JavaMarkerAnnotation) { fIncludesProblemMarkerAnnotations= ((JavaMarkerAnnotation) annotation).isProblem(); } else if (annotation instanceof MarkerAnnotation) { try { IMarker marker= ((MarkerAnnotation) annotation).getMarker(); if (!marker.exists() || marker.isSubtypeOf(IMarker.PROBLEM)) { fIncludesProblemMarkerAnnotations= true; } } catch (CoreException e) { JavaPlugin.log(e); } } }