UP | HOME
CS 7140 2015-06-01

The Entities within a Programmer's Editor

Table of Contents

1 The Entitites within a Programmer's Editor

1.1 A Text Editor

  1. Can we state criteria so that a given program can be called a "text editor"?
  2. string search/replace
  3. selection of text
  4. cut/copy and paste
  5. text fill into para
  6. text folding
  7. word wrapping
  8. undo, redo
  9. Language specific: spell check, suggested words
  10. kbd/mouse/… macros

1.2 A Programmer's Editor

  1. What distinguishes a programmers' editor from an ordinary text editor?
    1. PL syntax is recognized to a good extent
    2. Code blocks, even in the presence of some syntax errors
    3. Jumping from one element to another, perhaps using ctags/etags kind of tools
    4. Abstract Syntax Trees (AST) awareness
  2. regex find/capture/replace
  3. aware of syntax
    1. Abstract Syntax Trees (AST)
    2. comments
    3. "special things": paren, bracket, braces
    4. if-fi, do-od, …

2 Text Editor Passive Entitites

2.1 Files

  1. File Name
  2. File Content
    1. Lines of Text
    2. Meta data?
  3. Text encoding
  4. EOLN, EOF
  5. All the above well understood … so sweep it under the …
  6. Particular classes of files: help, macros, uml, …

2.1.1 Edit Buffers

  1. An internal data str; holds (file) content
  2. Associated with a file? Always?
  3. Numerous designs are possible
    1. A Linked List of Lines
    2. A chunk of dynamically allocated area of memory, viewed as left-part, gap, right-part. Content == left-part + right-part.
  4. How to choose?

2.1.2 Clip Registers

  1. "Emacs registers are compartments …"
  2. Kill Rings, Cut areas, Clipboards
  3. Different from Buffer?

2.1.3 View

  1. 2-D "scroll" of text content – mostly hidden
  2. visible: R lines, C columns
  3. appearance: fonts, cursors, …

2.1.4 Markers

  1. Traditional: Dot and Mark; Generalized: Book marks
  2. (x, y) coord address within text-content that should remain "stable" even after insert/deletes
  3. Perhaps number all lines or paragraphs. Cf. a legal document.

2.2 Folding

  1. A tree structure view of content

2.3 Plugins

  1. What is a plugin?
  2. What does a new plugin "deliver"?
  3. A "bad" plugin can crash the parent
  4. pre- post- invariants?

2.4 Dictionaries

  1. "Correction" suggestions

2.5 Help Files

3 Programmer's Editor Passive Entitites?

4 Text Editor Active Entitites

4.1 Text Ed Operations

  1. Ops on Files, Buffers, Registers, Markers, …
  2. Semantics of Undo/Redo
  3. Feasibility of some "Undo"

4.2 Engine v UI-binding ("Key" Bindings)

  1. Software Architecture
  2. Engine == Collection of all "operations"
  3. UI-In == How an op of the engine is invoked
  4. UI-Out == How the state of the engine is "shown"
  5. A Goal: Do the UI both interactively and non-interactively
  6. Study Emacs binding mechanism

4.3 Help

  1. Browse pre-existing pages
  2. Context-sensitive

4.4 Syntax Awareness

  1. Highlighting
  2. Comments
  3. Matching "corresponding entries"
    1. paren, bracket, brace matching
    2. if-fi, do-od, …

4.5 Features that we get as a result of using certain API

  1. window resize, move, …;
  2. Is printing done by jEdit/ BlueJ/ … or a Java "service"?

Copyright © 2015 • www.wright.edu/~pmateti • 2015-06-01