use of com.intellij.diff.tools.holders.TextEditorHolder in project intellij-community by JetBrains.
the class OnesideTextDiffViewer method createEditorHolder.
@NotNull
@Override
protected TextEditorHolder createEditorHolder(@NotNull EditorHolderFactory<TextEditorHolder> factory) {
TextEditorHolder holder = super.createEditorHolder(factory);
boolean[] forceReadOnly = TextDiffViewerUtil.checkForceReadOnly(myContext, myRequest);
if (forceReadOnly[0])
holder.getEditor().setViewer(true);
return holder;
}
use of com.intellij.diff.tools.holders.TextEditorHolder in project intellij-community by JetBrains.
the class TwosideTextDiffViewer method createEditorHolders.
@NotNull
@Override
protected List<TextEditorHolder> createEditorHolders(@NotNull EditorHolderFactory<TextEditorHolder> factory) {
List<TextEditorHolder> holders = super.createEditorHolders(factory);
boolean[] forceReadOnly = TextDiffViewerUtil.checkForceReadOnly(myContext, myRequest);
for (int i = 0; i < 2; i++) {
if (forceReadOnly[i])
holders.get(i).getEditor().setViewer(true);
}
Side.LEFT.select(holders).getEditor().setVerticalScrollbarOrientation(EditorEx.VERTICAL_SCROLLBAR_LEFT);
for (TextEditorHolder holder : holders) {
DiffUtil.disableBlitting(holder.getEditor());
}
return holders;
}
use of com.intellij.diff.tools.holders.TextEditorHolder in project intellij-community by JetBrains.
the class ThreesideTextDiffViewer method createEditorHolders.
@NotNull
@Override
protected List<TextEditorHolder> createEditorHolders(@NotNull EditorHolderFactory<TextEditorHolder> factory) {
List<TextEditorHolder> holders = super.createEditorHolders(factory);
boolean[] forceReadOnly = TextDiffViewerUtil.checkForceReadOnly(myContext, myRequest);
for (int i = 0; i < 3; i++) {
if (forceReadOnly[i])
holders.get(i).getEditor().setViewer(true);
}
ThreeSide.LEFT.select(holders).getEditor().setVerticalScrollbarOrientation(EditorEx.VERTICAL_SCROLLBAR_LEFT);
((EditorMarkupModel) ThreeSide.BASE.select(holders).getEditor().getMarkupModel()).setErrorStripeVisible(false);
for (TextEditorHolder holder : holders) {
DiffUtil.disableBlitting(holder.getEditor());
}
return holders;
}
Aggregations