Interface SourceCodeEditor

All Superinterfaces:
Component, Component.BelongToFrame, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Field<String>, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, HasValidator<String>, HasValue<String>, HasValueSource<String>, Requirable, Validatable
All Known Implementing Classes:
SourceCodeEditorImpl

@StudioComponent(caption="SourceCodeEditor", category="Components", xmlElement="sourceCodeEditor", icon="io/jmix/ui/icon/component/sourceCodeEditor.svg", canvasBehaviour=SOURCE_CODE_EDITOR, documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/source-code-editor.html") public interface SourceCodeEditor extends Field<String>, Component.Focusable
Text area component with source code highlighting support.
  • Field Details

  • Method Details

    • getMode

      HighlightMode getMode()
    • setMode

      @StudioProperty(type=ENUMERATION, defaultValue="Text", options={"ABAP","ABC","ActionScript","ADA","ApacheConf","AsciiDoc","AssemblyX86","AutoHot","BatchFile","C9SearchResults","Clojure","Cobol","CoffeeScript","ColdFusion","CSharp","CSS","Curly","CCpp","D","Dart","Diff","Django","Dot","EJS","Elixir","Elm","Erlang","Forth","FreeMarker","Glsl","Go","Groovy","HAML","Handlebars","Haskell","HaXe","HTML","HTMLCompletions","HTMLRuby","INI","Jack","Jade","Java","JavaScript","JSON","JSONiq","JSP","JSX","Julia","LaTeX","Lean","LESS","Liquid","Lisp","LiveScript","LogiQL","LSL","Lua","LuaPage","Lucene","Makefile","Markdown","MATLAB","MEL","MIPSAssembler","MUSHCode","MUSHCodeHighRules","MySQL","Nix","ObjectiveC","OCaml","Pascal","Perl","PgSQL","PHP","PlainText","Powershell","Prolog","Properties","Protobuf","Python","R","RDoc","RHTML","Ruby","Rust","SASS","SCAD","Scala","Scheme","SCSS","SH","SJS","Snippets","SoyTemplate","Space","SQL","Stylus","SVG","Tcl","Tex","Text","Textile","Toml","Twig","Typescript","VBScript","Velocity","Verilog","VHDL","XML","XQuery","YAML"}) void setMode(HighlightMode mode)
    • getSuggester

      @Nullable Suggester getSuggester()
    • setSuggester

      void setSuggester(@Nullable Suggester suggester)
    • getAutoCompleteSupport

      AutoCompleteSupport getAutoCompleteSupport()
    • setShowGutter

      @StudioProperty(defaultValue="true") void setShowGutter(boolean showGutter)
    • isShowGutter

      boolean isShowGutter()
    • setShowPrintMargin

      @StudioProperty(name="printMargin", defaultValue="true") void setShowPrintMargin(boolean showPrintMargin)
    • isShowPrintMargin

      boolean isShowPrintMargin()
    • setPrintMarginColumn

      @StudioProperty(defaultValue="80") void setPrintMarginColumn(int printMarginColumn)
      Set print margin position in symbols
      Parameters:
      printMarginColumn - print margin position in symbols
    • getPrintMarginColumn

      int getPrintMarginColumn()
      Returns:
      print margin position in symbols
    • setHighlightActiveLine

      @StudioProperty(defaultValue="true") void setHighlightActiveLine(boolean highlightActiveLine)
    • isHighlightActiveLine

      boolean isHighlightActiveLine()
    • setHandleTabKey

      @StudioProperty(defaultValue="true") void setHandleTabKey(boolean handleTabKey)
      Enables Tab key handling as tab symbol. If handleTabKey is false then Tab/Shift-Tab key press will change focus to next/previous field.
    • isHandleTabKey

      boolean isHandleTabKey()
      Returns:
      if Tab key handling is enabled
    • getValue

      @Nullable String getValue()
      Specified by:
      getValue in interface HasValue<String>
    • getRawValue

      String getRawValue()
      Returns a string representation of the value.
    • resetEditHistory

      void resetEditHistory()
      Reset the stack of undo/redo redo operations.
    • isSuggestOnDot

      boolean isSuggestOnDot()
      Returns:
      true if SourceCodeEditor suggests options after typing a dot character
    • setSuggestOnDot

      @StudioProperty(name="suggestOnDot", defaultValue="true") void setSuggestOnDot(boolean suggest)
      Sets whether SourceCodeEditor should suggest options after typing a dot character. Default value is true.
      Parameters:
      suggest - suggest option