private int myTextAnnotationGuttersSize = 0;
private int myTextAnnotationExtraSize = 0;
private TIntArrayList myTextAnnotationGutterSizes = new TIntArrayList();
- private ArrayList<TextAnnotationGutterProvider> myTextAnnotationGutters = new ArrayList<TextAnnotationGutterProvider>();
- private final Map<TextAnnotationGutterProvider, EditorGutterAction> myProviderToListener = new HashMap<TextAnnotationGutterProvider, EditorGutterAction>();
+ private ArrayList<TextAnnotationGutterProvider> myTextAnnotationGutters = new ArrayList<>();
+ private final Map<TextAnnotationGutterProvider, EditorGutterAction> 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<Color> myTextFgColors = new TIntObjectHashMap<Color>();
+ private TIntObjectHashMap<Color> myTextFgColors = new TIntObjectHashMap<>();
private boolean myPaintBackground = true;
private boolean myLeftFreePaintersAreaShown;
private boolean myRightFreePaintersAreaShown;
private TIntObjectHashMap<List<GutterMark>> myLineToGutterRenderers;
private void calcLineMarkerAreaWidth() {
- myLineToGutterRenderers = new TIntObjectHashMap<List<GutterMark>>();
+ myLineToGutterRenderers = new TIntObjectHashMap<>();
myLeftFreePaintersAreaShown = myForceLeftFreePaintersAreaShown;
myRightFreePaintersAreaShown = myForceRightFreePaintersAreaShown;
int line = myEditor.getDocument().getLineNumber(lineStartOffset);
List<GutterMark> renderers = myLineToGutterRenderers.get(line);
if (renderers == null) {
- renderers = new SmartList<GutterMark>();
+ renderers = new SmartList<>();
myLineToGutterRenderers.put(line, renderers);
}
}
if (toolTip != null && !toolTip.isEmpty()) {
- final Ref<Point> t = new Ref<Point>(e.getPoint());
+ final Ref<Point> t = new Ref<>(e.getPoint());
int line = EditorUtil.yPositionToLogicalLine(myEditor, e);
List<GutterMark> row = myLineToGutterRenderers.get(line);
Balloon.Position ballPosition = Balloon.Position.atRight;
if (row != null) {
- final TreeMap<Integer, GutterMark> xPos = new TreeMap<Integer, GutterMark>();
+ final TreeMap<Integer, GutterMark> xPos = new TreeMap<>();
final int[] currentPos = {0};
processIconsRow(line, row, new LineGutterIconRendererProcessor() {
@Override
}
});
- List<Integer> xx = new ArrayList<Integer>(xPos.keySet());
+ List<Integer> xx = new ArrayList<>(xPos.keySet());
int posIndex = xx.indexOf(currentPos[0]);
if (xPos.size() > 1 && posIndex == 0) {
ballPosition = Balloon.Position.below;
}
private void revalidateSizes() {
- myTextAnnotationGutters = new ArrayList<TextAnnotationGutterProvider>();
+ myTextAnnotationGutters = new ArrayList<>();
myTextAnnotationGutterSizes = new TIntArrayList();
updateSize();
}
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<AnAction> addActions = new ArrayList<AnAction>();
+ final List<AnAction> addActions = new ArrayList<>();
final Point p = e.getPoint();
int line = EditorUtil.yPositionToLogicalLine(myEditor, p);
//if (line >= myEditor.getDocument().getLineCount()) return;