use of com.intellij.ui.EditorTextField in project azure-tools-for-java by Microsoft.
the class AzureSdkArtifactGroupPanel method buildCodeViewer.
private EditorTextField buildCodeViewer() {
final Project project = ProjectManager.getInstance().getOpenProjects()[0];
final DocumentImpl document = new DocumentImpl("", true);
final EditorTextField viewer = new EditorTextField(document, project, XmlFileType.INSTANCE, true, false);
viewer.addSettingsProvider(editor -> {
// add scrolling/line number features
editor.setHorizontalScrollbarVisible(true);
editor.setVerticalScrollbarVisible(true);
editor.getSettings().setLineNumbersShown(true);
});
return viewer;
}
use of com.intellij.ui.EditorTextField in project intellij by bazelbuild.
the class BlazeAndroidBinaryRunConfigurationStateEditor method createUIComponents.
private void createUIComponents(Project project) {
final EditorTextField editorTextField = new LanguageTextField(PlainTextLanguage.INSTANCE, project, "") {
@Override
protected EditorEx createEditor() {
final EditorEx editor = super.createEditor();
final PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
if (file != null) {
DaemonCodeAnalyzer.getInstance(project).setHighlightingEnabled(file, false);
}
editor.putUserData(ACTIVITY_CLASS_TEXT_FIELD_KEY, BlazeAndroidBinaryRunConfigurationStateEditor.this);
return editor;
}
};
activityField = new ComponentWithBrowseButton<EditorTextField>(editorTextField, null);
}
Aggregations