Exemple #1
0
 private void markWelltyped(ITypingCheck check) {
   // remove marker in case one exists (can happen during reevaluation)
   assert check.getFile() != null;
   if (markerIds.containsKey(check)) {
     long markerId = markerIds.remove(check);
     IMarker marker = check.getFile().getResource().getMarker(markerId);
     if (marker.exists())
       try {
         marker.delete();
       } catch (CoreException e) {
         e.printStackTrace();
       }
   }
 }
Exemple #2
0
  private void markIlltyped(ITypingCheck check) {

    try {
      if (markerIds.containsKey(check)) {
        long markerId = markerIds.get(check);
        IMarker marker = check.getFile().getResource().getMarker(markerId);
        if (marker.exists()) {
          new TypingMarkerFactory().updateErrorMarker(marker, check);
          return;
        }
      }
      IMarker marker = new TypingMarkerFactory().createErrorMarker(check);
      markerIds.put(check, marker.getId());
    } catch (CoreException e) {
      e.printStackTrace();
    }
  }