Sha256: b3df32088a052e8d957c0fe18577b55de9cc1f6be705a2b136f1c4f3e6046805

Contents?: true

Size: 586 Bytes

Versions: 41

Compression:

Stored size: 586 Bytes

Contents

module Redcar
  module SyntaxCheck
    class Error
      Type  = "syntax.error.type"
      Icon  = "compile-error"
      Color = [255, 32, 32]

      attr_accessor :line, :char, :message, :doc

      def initialize(doc, line, message, char=0)
        @doc       = doc
        @line      = line
        @message   = message
        @char      = char
      end

      def annotate
        edit_view = doc.edit_view
        edit_view.add_annotation_type(Type, Icon, Color)
        edit_view.add_annotation(Type, line, message, @char, doc.get_line(line).length)
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
redcar-0.13 plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.13.5dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.13.4dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.13.3dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.13.2dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.13.1dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-0.12.1 plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.13.0dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-0.12 plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.27dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.26dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.25dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.24dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.23dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.22dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.21dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.20dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.19dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.18dev plugins/syntax_check/lib/syntax_check/error.rb
redcar-dev-0.12.17dev plugins/syntax_check/lib/syntax_check/error.rb