diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java index a5f60db80fa1..c8fee9637179 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorGutterComponentImpl.java @@ -135,15 +135,15 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse private int myTextAnnotationGuttersSize = 0; private int myTextAnnotationExtraSize = 0; private TIntArrayList myTextAnnotationGutterSizes = new TIntArrayList(); - private ArrayList myTextAnnotationGutters = new ArrayList(); - private final Map myProviderToListener = new HashMap(); + private ArrayList myTextAnnotationGutters = new ArrayList<>(); + private final Map myProviderToListener = new HashMap<>(); private String myLastGutterToolTip = null; @NotNull private TIntFunction myLineNumberConvertor; @Nullable private TIntFunction myAdditionalLineNumberConvertor; private TIntFunction myLineNumberAreaWidthFunction; private boolean myShowDefaultGutterPopup = true; @Nullable private ActionGroup myCustomGutterPopupGroup; - private TIntObjectHashMap myTextFgColors = new TIntObjectHashMap(); + private TIntObjectHashMap myTextFgColors = new TIntObjectHashMap<>(); private boolean myPaintBackground = true; private boolean myLeftFreePaintersAreaShown; private boolean myRightFreePaintersAreaShown; @@ -737,7 +737,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse private TIntObjectHashMap> myLineToGutterRenderers; private void calcLineMarkerAreaWidth() { - myLineToGutterRenderers = new TIntObjectHashMap>(); + myLineToGutterRenderers = new TIntObjectHashMap<>(); myLeftFreePaintersAreaShown = myForceLeftFreePaintersAreaShown; myRightFreePaintersAreaShown = myForceRightFreePaintersAreaShown; @@ -762,7 +762,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse int line = myEditor.getDocument().getLineNumber(lineStartOffset); List renderers = myLineToGutterRenderers.get(line); if (renderers == null) { - renderers = new SmartList(); + renderers = new SmartList<>(); myLineToGutterRenderers.put(line, renderers); } @@ -1426,12 +1426,12 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse } if (toolTip != null && !toolTip.isEmpty()) { - final Ref t = new Ref(e.getPoint()); + final Ref t = new Ref<>(e.getPoint()); int line = EditorUtil.yPositionToLogicalLine(myEditor, e); List row = myLineToGutterRenderers.get(line); Balloon.Position ballPosition = Balloon.Position.atRight; if (row != null) { - final TreeMap xPos = new TreeMap(); + final TreeMap xPos = new TreeMap<>(); final int[] currentPos = {0}; processIconsRow(line, row, new LineGutterIconRendererProcessor() { @Override @@ -1445,7 +1445,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse } }); - List xx = new ArrayList(xPos.keySet()); + List xx = new ArrayList<>(xPos.keySet()); int posIndex = xx.indexOf(currentPos[0]); if (xPos.size() > 1 && posIndex == 0) { ballPosition = Balloon.Position.below; @@ -1663,7 +1663,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse } private void revalidateSizes() { - myTextAnnotationGutters = new ArrayList(); + myTextAnnotationGutters = new ArrayList<>(); myTextAnnotationGutterSizes = new TIntArrayList(); updateSize(); } @@ -1742,7 +1742,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse if (myEditor.getMouseEventArea(e) == EditorMouseEventArea.ANNOTATIONS_AREA) { DefaultActionGroup actionGroup = new DefaultActionGroup(EditorBundle.message("editor.annotations.action.group.name"), true); actionGroup.add(new CloseAnnotationsAction()); - final List addActions = new ArrayList(); + final List addActions = new ArrayList<>(); final Point p = e.getPoint(); int line = EditorUtil.yPositionToLogicalLine(myEditor, p); //if (line >= myEditor.getDocument().getLineCount()) return;