vcs annotate: cleanup
authorAleksey Pivovarov <AMPivovarov@gmail.com>
Sat, 20 Jun 2015 12:27:42 +0000 (15:27 +0300)
committerAleksey Pivovarov <AMPivovarov@gmail.com>
Thu, 3 Sep 2015 16:28:03 +0000 (19:28 +0300)
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AnnotateToggleAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AnnotationFieldGutter.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/CurrentRevisionAnnotationFieldGutter.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/ExtraFieldGutter.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/HighlightedAdditionalColumn.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/HistoryIdColumn.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/MergeSourceAvailableMarkerGutter.java

index c2d158d2edb6684f5657c2437e36778cb43fce2d..dbacfe468507189958484ebbbc79c406851163cc 100644 (file)
@@ -260,9 +260,9 @@ public class AnnotateToggleAction extends ToggleAction implements DumbAware, Ann
       switcher.switchTo(switcher.getDefaultSource());
       final LineAnnotationAspect revisionAspect = switcher.getRevisionAspect();
       final CurrentRevisionAnnotationFieldGutter currentRevisionGutter =
-        new CurrentRevisionAnnotationFieldGutter(fileAnnotation, editor, revisionAspect, presentation, bgColorMap);
+        new CurrentRevisionAnnotationFieldGutter(fileAnnotation, revisionAspect, presentation, bgColorMap);
       final MergeSourceAvailableMarkerGutter mergeSourceGutter =
-        new MergeSourceAvailableMarkerGutter(fileAnnotation, editor, null, presentation, bgColorMap);
+        new MergeSourceAvailableMarkerGutter(fileAnnotation, null, presentation, bgColorMap);
 
       presentation.addAction(new SwitchAnnotationSourceAction(switcher, editorGutter));
       presentation.addSourceSwitchListener(currentRevisionGutter);
@@ -277,17 +277,17 @@ public class AnnotateToggleAction extends ToggleAction implements DumbAware, Ann
 
     final LineAnnotationAspect[] aspects = fileAnnotation.getAspects();
     for (LineAnnotationAspect aspect : aspects) {
-      gutters.add(new AnnotationFieldGutter(fileAnnotation, editor, aspect, presentation, bgColorMap));
+      gutters.add(new AnnotationFieldGutter(fileAnnotation, aspect, presentation, bgColorMap));
     }
 
 
     if (historyIds != null) {
-      gutters.add(new HistoryIdColumn(fileAnnotation, editor, presentation, bgColorMap, historyIds));
+      gutters.add(new HistoryIdColumn(fileAnnotation, presentation, bgColorMap, historyIds));
     }
-    gutters.add(new HighlightedAdditionalColumn(fileAnnotation, editor, null, presentation, bgColorMap));
+    gutters.add(new HighlightedAdditionalColumn(fileAnnotation, null, presentation, bgColorMap));
     final AnnotateActionGroup actionGroup = new AnnotateActionGroup(gutters, editorGutter);
     presentation.addAction(actionGroup, 1);
-    gutters.add(new ExtraFieldGutter(fileAnnotation, editor, presentation, bgColorMap, actionGroup));
+    gutters.add(new ExtraFieldGutter(fileAnnotation, presentation, bgColorMap, actionGroup));
 
     presentation.addAction(new AnnotateCurrentRevisionAction(fileAnnotation, vcs));
     presentation.addAction(new AnnotatePreviousRevisionAction(fileAnnotation, vcs));
index d532835fa54cb6081b2517948fb38fd1d987aa65..9cec83c21c6addc00ef2587ffef894e7ced15cc4 100644 (file)
@@ -46,11 +46,19 @@ public class AnnotationFieldGutter implements ActiveAnnotationGutter {
   private final boolean myIsGutterAction;
   private Couple<Map<VcsRevisionNumber, Color>> myColorScheme;
 
+  @Deprecated
   AnnotationFieldGutter(FileAnnotation annotation,
                         Editor editor,
                         LineAnnotationAspect aspect,
                         final TextAnnotationPresentation presentation,
                         Couple<Map<VcsRevisionNumber, Color>> colorScheme) {
+    this(annotation, aspect, presentation, colorScheme);
+  }
+
+  AnnotationFieldGutter(FileAnnotation annotation,
+                        LineAnnotationAspect aspect,
+                        final TextAnnotationPresentation presentation,
+                        Couple<Map<VcsRevisionNumber, Color>> colorScheme) {
     myAnnotation = annotation;
     myAspect = aspect;
     myPresentation = presentation;
index 7d31deca16234f03091d5f3423a8972c1fbdfcf0..78bbc5fdcbf99d5ac7a9b74ad173bdadbb2dc85d 100644 (file)
@@ -39,11 +39,10 @@ class CurrentRevisionAnnotationFieldGutter extends AnnotationFieldGutter impleme
   private boolean myTurnedOn;
 
   CurrentRevisionAnnotationFieldGutter(FileAnnotation annotation,
-                                       Editor editor,
                                        LineAnnotationAspect aspect,
                                        TextAnnotationPresentation highlighting,
                                        Couple<Map<VcsRevisionNumber, Color>> colorScheme) {
-    super(annotation, editor, aspect, highlighting, colorScheme);
+    super(annotation, aspect, highlighting, colorScheme);
   }
 
   @Override
index e265e9e960f3b4a9104ddb08c5646a4146750d27..77828f9fbd9a3f9631a19c3cf7615236d5c38330 100644 (file)
@@ -30,10 +30,9 @@ public class ExtraFieldGutter extends AnnotationFieldGutter  {
   private final AnnotateActionGroup myActionGroup;
 
   public ExtraFieldGutter(FileAnnotation fileAnnotation,
-                          Editor editor,
                           AnnotationPresentation presentation,
                           Couple<Map<VcsRevisionNumber, Color>> bgColorMap, AnnotateActionGroup actionGroup) {
-    super(fileAnnotation, editor, null, presentation, bgColorMap);
+    super(fileAnnotation, null, presentation, bgColorMap);
     myActionGroup = actionGroup;
   }
 
index 6c16c9e806b21a1b399412727b738611aa66e4c5..ebc9ed5e86383a7980186dda3c2eea6e338defd6 100644 (file)
@@ -28,11 +28,10 @@ import java.util.Map;
 class HighlightedAdditionalColumn extends AnnotationFieldGutter {
 
   HighlightedAdditionalColumn(FileAnnotation annotation,
-                              Editor editor,
                               LineAnnotationAspect aspect,
                               TextAnnotationPresentation presentation,
                               Couple<Map<VcsRevisionNumber, Color>> colorScheme) {
-    super(annotation, editor, aspect, presentation, colorScheme);
+    super(annotation, aspect, presentation, colorScheme);
   }
 
   @Override
index 5b4d50a58037f1dc5fa38633ebddc806e6366c53..69ae0842bd533a608c572ca95db514675cb87c93 100644 (file)
@@ -32,11 +32,10 @@ class HistoryIdColumn extends AnnotationFieldGutter {
   private final Map<VcsRevisionNumber, Integer> myHistoryIds;
 
   HistoryIdColumn(FileAnnotation annotation,
-                  final Editor editor,
                   final TextAnnotationPresentation presentation,
                   Couple<Map<VcsRevisionNumber, Color>> colorScheme,
                   Map<VcsRevisionNumber, Integer> ids) {
-    super(annotation, editor, null, presentation, colorScheme);
+    super(annotation, null, presentation, colorScheme);
     myHistoryIds = ids;
   }
 
index c561387b16ecac6e2230baf6f32fdb20b14f88ac..6c2ef07295597b64e48bb7708c3d9b82e5cffdf7 100644 (file)
@@ -33,11 +33,10 @@ class MergeSourceAvailableMarkerGutter extends AnnotationFieldGutter implements
   private boolean myTurnedOn;
 
   MergeSourceAvailableMarkerGutter(FileAnnotation annotation,
-                                   Editor editor,
                                    LineAnnotationAspect aspect,
                                    TextAnnotationPresentation highlighting,
                                    Couple<Map<VcsRevisionNumber, Color>> colorScheme) {
-    super(annotation, editor, aspect, highlighting, colorScheme);
+    super(annotation, aspect, highlighting, colorScheme);
   }
 
   @Override