mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[rider]: allow to change initial icon area width
This commit is contained in:
@@ -214,6 +214,7 @@ public class DiffUtil {
|
||||
editor.getSettings().setShowIntentionBulb(false);
|
||||
((EditorMarkupModel)editor.getMarkupModel()).setErrorStripeVisible(true);
|
||||
editor.getGutterComponentEx().setShowDefaultGutterPopup(false);
|
||||
editor.getGutterComponentEx().resetInitialIconAreaWidth();
|
||||
|
||||
if (enableFolding) {
|
||||
setFoldingModelSupport(editor);
|
||||
|
||||
@@ -83,6 +83,7 @@ public class ConsoleViewUtil {
|
||||
editorSettings.setRightMarginShown(false);
|
||||
editorSettings.setCaretRowShown(false);
|
||||
editor.getGutterComponentEx().setPaintBackground(false);
|
||||
editor.getGutterComponentEx().resetInitialIconAreaWidth();
|
||||
|
||||
editor.putUserData(EDITOR_IS_CONSOLE_VIEW, true);
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ public class DiffUtil {
|
||||
EditorEx editor = (EditorEx)(isViewer ? factory.createViewer(document, project) : factory.createEditor(document, project));
|
||||
editor.putUserData(DiffManagerImpl.EDITOR_IS_DIFF_KEY, Boolean.TRUE);
|
||||
editor.getGutterComponentEx().revalidateMarkup();
|
||||
editor.getGutterComponentEx().resetInitialIconAreaWidth();
|
||||
|
||||
if (fileType != null && project != null && !project.isDisposed()) {
|
||||
CodeStyleFacade codeStyleFacade = CodeStyleFacade.getInstance(project);
|
||||
|
||||
@@ -62,4 +62,8 @@ public abstract class EditorGutterComponentEx extends JComponent implements Edit
|
||||
public abstract void setForceShowLeftFreePaintersArea(boolean value);
|
||||
|
||||
public abstract void setForceShowRightFreePaintersArea(boolean value);
|
||||
|
||||
public abstract void setInitialIconAreaWidth(int width);
|
||||
|
||||
public abstract void resetInitialIconAreaWidth();
|
||||
}
|
||||
|
||||
+12
-1
@@ -127,6 +127,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
private final EditorImpl myEditor;
|
||||
private final FoldingAnchorsOverlayStrategy myAnchorsDisplayStrategy;
|
||||
@Nullable private TIntObjectHashMap<List<GutterMark>> myLineToGutterRenderers;
|
||||
private int myStartIconAreaWidth = START_ICON_AREA_WIDTH;
|
||||
private int myIconsAreaWidth;
|
||||
private int myLineNumberAreaWidth;
|
||||
private int myAdditionalLineNumberAreaWidth;
|
||||
@@ -809,7 +810,7 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
}
|
||||
});
|
||||
|
||||
int minWidth = areIconsShown() ? scaleWidth(START_ICON_AREA_WIDTH) : 0;
|
||||
int minWidth = areIconsShown() ? scaleWidth(myStartIconAreaWidth) : 0;
|
||||
myIconsAreaWidth = canShrink ? minWidth : Math.max(myIconsAreaWidth, minWidth);
|
||||
|
||||
processGutterRenderers((line, renderers) -> {
|
||||
@@ -1804,6 +1805,16 @@ class EditorGutterComponentImpl extends EditorGutterComponentEx implements Mouse
|
||||
myForceRightFreePaintersAreaShown = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInitialIconAreaWidth(int width) {
|
||||
myStartIconAreaWidth = width;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetInitialIconAreaWidth() {
|
||||
myStartIconAreaWidth = START_ICON_AREA_WIDTH;
|
||||
}
|
||||
|
||||
private void invokePopup(MouseEvent e) {
|
||||
final ActionManager actionManager = ActionManager.getInstance();
|
||||
if (myEditor.getMouseEventArea(e) == EditorMouseEventArea.ANNOTATIONS_AREA) {
|
||||
|
||||
Reference in New Issue
Block a user