List<Integer> () { List<Integer> margins = myView.getEditor().getSettings().getSoftMargins(); List<Integer> result = new ArrayList<>(margins.size()); for (Integer margin : margins) { result.add((int)(myView.getRightAlignmentMarginX() - margin * myView.getPlainSpaceWidth())); } return result; }