com.borland.primetime.editor
Class EditorActions.SmartBackspaceAction

java.lang.Object
  |
  +--javax.swing.AbstractAction
        |
        +--com.borland.primetime.editor.EditorAction
              |
              +--com.borland.primetime.editor.EditorActions.SmartBackspaceAction
Enclosing class:
EditorActions

public static class EditorActions.SmartBackspaceAction
extends EditorAction

This is the SmartBackspaceAction action. It does a variety of things according to the following rules:

  1. If there is a current selection, simply delete that selection.
  2. If the caret is at the start of the line, simply delete the previous newline character, if any.
  3. If the caret is not at the start of the line, see if there are any non-whitespace characters to the left of the caret. If so, simply delete the previous character.
  4. If the caret is not at the start of the line, and everthing to the left of the caret is whitespace, do something interesting. First, determine where the previous tabstop is. Next, determine the column number of the first non-whitespace character on a previous line. Find out which is farther to the left, then delete all of the whitespace between that position and the current caret position.

See Also:
Serialized Form

Inner classes inherited from class com.borland.primetime.editor.EditorAction
EditorAction.SubKeymapAction
 
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
 
Constructor Summary
EditorActions.SmartBackspaceAction(java.lang.String nm)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 
Methods inherited from class com.borland.primetime.editor.EditorAction
getEditorTarget, getFocusedEditor, setFocusedEditor
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorActions.SmartBackspaceAction

public EditorActions.SmartBackspaceAction(java.lang.String nm)
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Overrides:
actionPerformed in class javax.swing.AbstractAction