rom.gui
Class CodeEditorFrame

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--rom.gui.CodeEditorFrame
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class CodeEditorFrame
extends javax.swing.JFrame

CodeEditorFrame - is a gui to edit & select methods from all (precompiled) currently executing objects in the enclosing programme

Title: Runtime Java Class Editor - editor Package

Package Description: Edit & Select methods from all currently executing objects in enclosing programme

Copyright: James D Bloom Copyright (c) 2003

Version:
1.0
Author:
James D Bloom
See Also:
Serialized Form

Nested Class Summary
(package private)  class CodeEditorFrame.BackAction
           
(package private)  class CodeEditorFrame.ClassModeAction
           
(package private)  class CodeEditorFrame.CloseAction
           
(package private)  class CodeEditorFrame.CodeEvaluationThread
           
(package private)  class CodeEditorFrame.CodeSyntaxColouringAction
           
(package private)  class CodeEditorFrame.ColorInJavaCodeThread
           
(package private)  class CodeEditorFrame.CopyAction
           
(package private)  class CodeEditorFrame.CutAction
           
(package private)  class CodeEditorFrame.EvaluateSelectedTextAction
           
(package private)  class CodeEditorFrame.EvaluateTextAreaAction
           
(package private)  class CodeEditorFrame.ExitAction
           
(package private)  class CodeEditorFrame.FindAction
           
(package private)  class CodeEditorFrame.FindDialog
           
(package private)  class CodeEditorFrame.ForwardsAction
           
(package private)  class CodeEditorFrame.GroupModeAction
           
(package private)  class CodeEditorFrame.HorizontalSliderAction
           
(package private)  class CodeEditorFrame.IgnoringStyleUndoManager
           
(package private)  class CodeEditorFrame.InstanceModeAction
           
(package private)  class CodeEditorFrame.LargerTextAction
           
(package private)  class CodeEditorFrame.LargerTreeAction
           
(package private)  class CodeEditorFrame.LargestTextAction
           
(package private)  class CodeEditorFrame.LargestTreeAction
           
(package private)  class CodeEditorFrame.MediumTextAction
           
(package private)  class CodeEditorFrame.MediumTreeAction
           
(package private)  class CodeEditorFrame.MouseHandler
          MouseHandler - is a standard mouse listener to listen for mouse events for the popup menu
(package private)  class CodeEditorFrame.NewAction
           
(package private)  class CodeEditorFrame.OpenAction
           
(package private)  class CodeEditorFrame.PageSetupAction
           
(package private)  class CodeEditorFrame.PasteAction
           
(package private)  class CodeEditorFrame.PrintAction
           
(package private)  class CodeEditorFrame.PrintStackTraceAction
           
(package private)  class CodeEditorFrame.RecycleAction
           
(package private)  class CodeEditorFrame.RedoAction
           
(package private)  class CodeEditorFrame.ReplaceAction
           
(package private)  class CodeEditorFrame.SaveAction
           
(package private)  class CodeEditorFrame.SaveAsAction
           
(package private)  class CodeEditorFrame.SaveCheckAction
           
(package private)  class CodeEditorFrame.SelectAllAction
           
(package private)  class CodeEditorFrame.SetAccessibleAction
           
(package private)  class CodeEditorFrame.ShowAboutAction
           
(package private)  class CodeEditorFrame.ShowHelpManualAction
           
(package private)  class CodeEditorFrame.ShowLicenseAction
           
(package private)  class CodeEditorFrame.SmallerTextAction
           
(package private)  class CodeEditorFrame.SmallerTreeAction
           
(package private)  class CodeEditorFrame.SmallestTextAction
           
(package private)  class CodeEditorFrame.SmallestTreeAction
           
(package private)  class CodeEditorFrame.StatusBarTimerTask
           
(package private)  class CodeEditorFrame.SwapPanesAction
           
(package private)  class CodeEditorFrame.SwitchedAction
           
(package private)  class CodeEditorFrame.TextPaneCaretListener
          TextPaneCaretListener - is a standard caret listener that listens for caret change events
(package private)  class CodeEditorFrame.TextPaneDocumentListener
          TextPaneDocumentListener - is a standard document listener that listens for document events
(package private)  class CodeEditorFrame.TreeClassCellRenderer
           
(package private)  class CodeEditorFrame.TreeClassSelectionListener
           
(package private)  class CodeEditorFrame.TreeExpantionListener
          TreeExpantionListener - is a standard tree will expand listener that listens for tree expansion events in a JTreeView
(package private)  class CodeEditorFrame.UndoAction
           
(package private)  class CodeEditorFrame.UpdateGraphicsTimerTask
           
(package private)  class CodeEditorFrame.VerticalSliderAction
           
(package private)  class CodeEditorFrame.WindowDisplayTimerTask
           
 
Field Summary
protected  CodeEditorFrame.ShowAboutAction aboutAction
           
protected  boolean ARRAY_EDITING_MODE
           
protected  java.util.List arrayHistory
           
protected  CodeEditorFrame.BackAction backAction
           
protected  java.awt.Point center
           
protected  javax.swing.JFileChooser chooser
           
protected  boolean CLASS_EDITING_MODE
           
protected  boolean classMode
           
protected  CodeEditorFrame.ClassModeAction classModeAction
           
protected  javax.swing.JCheckBoxMenuItem classModeCheckBox
           
protected  java.lang.String className
           
protected  javax.swing.JTree classTree
           
protected  java.lang.Class clazz
           
protected  CodeEditorFrame.CloseAction closeAction
           
protected  CodeEditorFrame codeEditorFrame
           
protected  java.lang.String codeEditorFrameTitle
           
protected  CodeEditorFrame.CodeSyntaxColouringAction colorCodeAction
           
protected  javax.swing.JCheckBoxMenuItem colorCodeCheckBox
           
(package private)  CodeEditorFrame.ColorInJavaCodeThread colorInJavaCodeThread
           
protected  java.awt.Color commentsColor
           
protected  javax.swing.JPanel contentPanel
           
protected  CodeEditorFrame.CopyAction copyAction
           
protected  int currentColumn
           
protected  int currentLineNo
           
protected  int currentMethodNumber
           
protected  int currentPositionInHistory
           
protected  CodeEditorFrame.CutAction cutAction
           
static boolean DEBUG
           
protected  java.lang.String defaultDirectory
           
protected  java.lang.String editMode
           
protected  java.awt.Color errorColor
           
protected  CodeEditorFrame.EvaluateSelectedTextAction evalSelection
           
protected  CodeEditorFrame.EvaluateTextAreaAction evalTextPane
           
protected  java.lang.Thread evaluationThread
           
protected  CodeEditorFrame.ExitAction exitAction
           
protected static java.lang.String FIELDS
           
protected  javax.swing.JWindow fieldValueDisplayWindow
           
protected  SourceFileFilter filter
           
protected  CodeEditorFrame.FindAction findAction
           
protected  CodeEditorFrame.FindDialog findReplaceDialog
           
protected  CodeEditorFrame.ForwardsAction forwardsAction
           
protected  boolean getSelectedText
           
protected  boolean groupMode
           
protected  CodeEditorFrame.GroupModeAction groupModeAction
           
protected  javax.swing.JCheckBoxMenuItem groupModeCheckBox
           
protected  java.lang.String groupName
           
protected  java.util.Set groupObjectList
           
protected  CodeEditorFrame.ShowHelpManualAction helpAction
           
protected  int historyCounter
           
protected  int historyLimit
           
protected  CodeEditorFrame.HorizontalSliderAction horizontalSliderAction
           
protected  javax.swing.JCheckBoxMenuItem horizontalSliderCheckBox
           
protected  boolean ignoreTextChanges
           
protected  int importLineCorrect
           
protected  java.lang.String[] imports
           
protected  boolean instanceMode
           
protected  CodeEditorFrame.InstanceModeAction instanceModeAction
           
protected  javax.swing.JCheckBoxMenuItem instanceModeCheckBox
           
(package private)  boolean isTopPaneField
           
protected  java.awt.Color keywordColor
           
protected  CodeEditorFrame.LargerTextAction largerTextAction
           
protected  javax.swing.JCheckBoxMenuItem largerTextCheckBox
           
protected  CodeEditorFrame.LargerTreeAction largerTreeAction
           
protected  javax.swing.JCheckBoxMenuItem largerTreeCheckBox
           
protected  CodeEditorFrame.LargestTextAction largestTextAction
           
protected  javax.swing.JCheckBoxMenuItem largestTextCheckBox
           
protected  CodeEditorFrame.LargestTreeAction largestTreeAction
           
protected  javax.swing.JCheckBoxMenuItem largestTreeCheckBox
           
protected  CodeEditorFrame.ShowLicenseAction licenseAction
           
protected  javax.swing.JLabel lineNoLabel
           
protected  java.lang.String lineNoString
           
(package private)  int lineNumber
           
protected  java.awt.GraphicsEnvironment localGraphicsEnvironment
           
(package private) static int longestLine
           
protected  boolean LOW_MEMORY
           
(package private) static CodeEditorFrame[] main
           
protected  javax.swing.text.DefaultStyledDocument mainStyledDocument
           
protected  CodeEditorFrame.MediumTextAction mediumTextAction
           
protected  javax.swing.JCheckBoxMenuItem mediumTextCheckBox
           
protected  CodeEditorFrame.MediumTreeAction mediumTreeAction
           
protected  javax.swing.JCheckBoxMenuItem mediumTreeCheckBox
           
protected  javax.swing.JMenuBar menuBar
           
protected  javax.swing.JLabel messageLabel
           
protected  java.lang.String messageString
           
protected  java.lang.String[][] methodParameters
           
protected static java.lang.String METHODS
           
protected  boolean modeChanged
           
protected  javax.swing.JLabel modeLabel
           
protected  boolean modified
           
protected  javax.swing.JLabel modifiedLabel
           
protected  java.lang.String modifiedString
           
protected  CodeEditorFrame.MouseHandler mouseHandler
           
protected  CodeEditorFrame.NewAction newAction
           
protected  int noOfMethods
           
(package private)  java.lang.String[] numberArray
           
protected  java.util.List objectHistory
           
protected  CodeEditorFrame.OpenAction openAction
           
protected  java.awt.Cursor originalDefaultCursorMainFrame
           
protected  java.awt.Cursor originalDefaultCursorSplitPane
           
protected  java.awt.Cursor originalDefaultCursorTextPane
           
protected  java.lang.String[] originalMethodArray
           
protected  java.awt.print.PageFormat pageFormat
           
protected  CodeEditorFrame.PageSetupAction pageSetupAction
           
protected  java.lang.String parameterCommaString
           
protected  java.lang.String[] parameters
           
protected  java.lang.String[] parsedMethodArray
           
protected  CodeEditorFrame.PasteAction pasteAction
           
protected  javax.swing.JPopupMenu popupEdit
           
protected  javax.swing.JPopupMenu popupFile
           
(package private)  int position
           
protected  rjce_precompiled precompiledObject
           
protected  rjce_precompiled[] precompiledObjectArray
           
static boolean PRINT_ERROR_STACKS
           
protected  CodeEditorFrame.PrintAction printAction
           
protected  javax.swing.JTextPane printingPane
           
protected  java.awt.print.PrinterJob printJob
           
protected  CodeEditorFrame.PrintStackTraceAction printStackTraceAction
           
protected  javax.swing.JCheckBoxMenuItem printStackTraceCheckBox
           
protected  java.awt.Color quotesColor
           
protected  java.lang.String randomAcessBufferForXMLFile
           
protected  CodeEditorFrame.RecycleAction recycleAction
           
protected  CodeEditorFrame.RedoAction redoAction
           
protected  javax.swing.JLabel redoLabel
           
protected  java.lang.String redoString
           
protected  CodeEditorFrame.ReplaceAction replaceAction
           
(package private)  CodeEditorFrame.SaveCheckAction save
           
protected  CodeEditorFrame.SaveAction saveAction
           
protected  CodeEditorFrame.SaveAsAction saveAsAction
           
(package private)  java.lang.StringBuffer scannedCode
           
protected  CodeEditorFrame.SelectAllAction selectAllAction
           
static boolean SET_ACCESSIBLE
           
protected  CodeEditorFrame.SetAccessibleAction setAccessibleAction
           
protected  javax.swing.JCheckBoxMenuItem setAccessibleCheckBox
           
protected  boolean SLOW_CPU
           
protected  CodeEditorFrame.SmallerTextAction smallerTextAction
           
protected  javax.swing.JCheckBoxMenuItem smallerTextCheckBox
           
protected  CodeEditorFrame.SmallerTreeAction smallerTreeAction
           
protected  javax.swing.JCheckBoxMenuItem smallerTreeCheckBox
           
protected  CodeEditorFrame.SmallestTextAction smallestTextAction
           
protected  javax.swing.JCheckBoxMenuItem smallestTextCheckBox
           
protected  CodeEditorFrame.SmallestTreeAction smallestTreeAction
           
protected  javax.swing.JCheckBoxMenuItem smallestTreeCheckBox
           
protected  javax.swing.JSplitPane splitPane
           
protected  javax.swing.JPanel statusBar
           
protected  CodeEditorFrame.CodeEvaluationThread stopAction
           
protected  int superClassLevel
           
protected  CodeEditorFrame.SwapPanesAction swapPanesAction
           
protected  CodeEditorFrame.SwitchedAction switchedAction
           
protected  javax.swing.JLabel switchedLabel
           
 boolean SYNTAX_COLOURING
           
protected  PrintableJTextPane textPane
           
protected  java.io.File textPaneFile
           
(package private)  java.lang.String textPaneText
           
protected  javax.swing.JScrollPane textScrollPane
           
protected  javax.swing.JPanel textScrollPaneWrapper
           
protected  boolean textSelected
           
protected  int textSize
           
protected  javax.swing.JToolBar toolBar
           
protected  int totalCharacters
           
protected  int totalNoOfLines
           
protected  CodeEditorFrame.TreeClassCellRenderer treeRenderer
           
protected  javax.swing.JScrollPane treeScrollPane
           
protected  javax.swing.JPanel treeScrollPaneWrapper
           
protected  int treeSize
           
protected  CodeEditorFrame.UndoAction undoAction
           
protected  javax.swing.JLabel undoLabel
           
protected  CodeEditorFrame.IgnoringStyleUndoManager undoManager
           
protected  java.lang.String undoString
           
protected  CodeEditorFrame.VerticalSliderAction verticalSliderAction
           
protected  javax.swing.JCheckBoxMenuItem verticalSliderCheckBox
           
protected  int windowHeight
           
protected  int windowTopLeftCornerX
           
protected  int windowTopLeftCornerY
           
protected  int windowWidth
           
protected  java.io.File xmlFile
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
private CodeEditorFrame()
           
  CodeEditorFrame(java.lang.Object precompiledObject)
          Constructors a text view for displaying and editing a text model
  CodeEditorFrame(java.lang.Object precompiledObject, boolean slow_cpu, boolean low_memory, boolean debug, boolean setAccessible, boolean syntaxColouring)
           
 
Method Summary
protected  javax.swing.JMenu addActions(javax.swing.Action[] actions, javax.swing.JMenu menu)
           
protected  javax.swing.JPopupMenu addActions(javax.swing.Action[] actions, javax.swing.JPopupMenu popupMenu)
           
protected  javax.swing.JToolBar addActions(javax.swing.Action[] actions, javax.swing.JToolBar toolBar)
           
protected  void addClassToTree(java.lang.Class clazz, javax.swing.tree.DefaultMutableTreeNode additionNode, boolean isEditable, boolean isInterface, boolean isFirstPass, boolean innerClass)
           
protected  int findMatchIngoringSpacesAndSelect(java.lang.String searchStr, java.lang.String keyStr)
           
protected  boolean getConformation(java.lang.String message)
          Displays a message for conformation on a Small popup frame which contains OK & CANCEL buttons and a question icon
protected  java.lang.reflect.Constructor[] getConstructors(java.lang.String unQualifiedType, java.util.Collection constructors)
           
protected  void getIdentifiersAndInnerClasses(java.util.Set identifiers, java.util.Map innerClasses, java.lang.Class clas)
           
protected  java.lang.Object[] getParametersFromTypes(java.lang.Class[] parameterTypes, java.lang.String methodName, boolean isClass)
           
protected  int getTextPosition(int line, int column, java.lang.String input)
           
protected  boolean getYesNoAnswer(java.lang.String message)
          Displays a message for conformation on a Small popup frame which contains OK & CANCEL buttons and a question icon
protected  int getYesNoCancelAnswer(java.lang.String message)
          Displays a message for conformation on a Small popup frame which contains OK & CANCEL buttons and a question icon
protected  void handlePrecompiledObjectArrayLoading(rjce_precompiled[] objArray, java.lang.String type, java.lang.Object fieldObj)
           
protected  void loadArray(rjce_precompiled[] objArray, java.lang.String type)
           
protected  void loadClassFromTree(javax.swing.tree.TreeNode node, java.lang.String innerClassName)
           
protected  void loadImports()
           
protected  void loadNewClass(rjce_precompiled oldObj, rjce_precompiled[] objArray)
           
static void main(java.lang.String[] args)
          Used for testing
protected  void processWindowEvent(java.awt.event.WindowEvent e)
           
protected  void reSetDefaultCursors()
           
protected  void reSetStatusBarAndTexPaneAccordingToCurentStatus(java.lang.String codeToLoad)
           
protected  void runFieldDisplayTask(java.lang.String str)
           
protected  void saveArraysBackToObject(rjce_precompiled oldObj, rjce_precompiled[] objArray)
           
protected  void setDefaultDirectory()
           
protected  void setSelection(int xStart, int xFinish, boolean moveUp)
           
protected  void setSelectionFromToken(int line, int column, java.lang.String tokenName, java.awt.Color color)
          Set the caret position in the text pane
protected  void setSelectionFromTokenANLTR(int line, int column, java.lang.String tokenName, java.awt.Color color)
          Set the caret position in the text pane
protected  void setUpActions()
          Setup actions for the menu bar and tool bar
protected  void setUpMainFrame()
          Setup main editor frame
protected  void setUpMenuBar()
          Setup menu bar
protected  void setUpPopupMenu()
          Setup popup menus
protected  void setUpSplitPane()
          Setup text area for editing java source
protected  void setUpStatusBar()
          Setup status bar
protected  void setUpTextPane()
          Setup text area for editing java source
protected  void setUpToolBar()
          Setup tool bars
protected  javax.swing.JPanel setUpTree()
          Setup tree view for object browsing
protected  void startSetup(java.lang.Object precompiledObject)
           
protected  void upDateMode()
           
protected  void warnUser(java.lang.String message)
          Displays a warning message on a Small popup frame which contains an OK button and an error icon
protected  void warnUserDEBUGTESTER(java.lang.String[] message, boolean hello)
           
protected  void warnUserOfExecutionError(java.lang.String exceptionName, java.lang.String exceptionMessage, java.lang.Throwable exceptionCause)
           
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Frame
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

main

static CodeEditorFrame[] main

clazz

protected java.lang.Class clazz

parsedMethodArray

protected java.lang.String[] parsedMethodArray

originalMethodArray

protected java.lang.String[] originalMethodArray

methodParameters

protected java.lang.String[][] methodParameters

noOfMethods

protected int noOfMethods

randomAcessBufferForXMLFile

protected java.lang.String randomAcessBufferForXMLFile

xmlFile

protected java.io.File xmlFile

parameters

protected java.lang.String[] parameters

parameterCommaString

protected java.lang.String parameterCommaString

imports

protected java.lang.String[] imports

classTree

protected javax.swing.JTree classTree

precompiledObject

protected rjce_precompiled precompiledObject

precompiledObjectArray

protected rjce_precompiled[] precompiledObjectArray

className

protected java.lang.String className

groupName

protected java.lang.String groupName

groupObjectList

protected java.util.Set groupObjectList

objectHistory

protected java.util.List objectHistory

arrayHistory

protected java.util.List arrayHistory

historyLimit

protected int historyLimit

historyCounter

protected int historyCounter

currentPositionInHistory

protected int currentPositionInHistory

codeEditorFrameTitle

protected java.lang.String codeEditorFrameTitle

getSelectedText

protected boolean getSelectedText

evaluationThread

protected java.lang.Thread evaluationThread

scannedCode

java.lang.StringBuffer scannedCode

numberArray

java.lang.String[] numberArray

mainStyledDocument

protected javax.swing.text.DefaultStyledDocument mainStyledDocument

currentLineNo

protected int currentLineNo

currentColumn

protected int currentColumn

totalNoOfLines

protected int totalNoOfLines

totalCharacters

protected int totalCharacters

currentMethodNumber

protected int currentMethodNumber

importLineCorrect

protected int importLineCorrect

modified

protected boolean modified

modeChanged

protected boolean modeChanged

textSelected

protected boolean textSelected

ignoreTextChanges

protected boolean ignoreTextChanges

textPaneFile

protected java.io.File textPaneFile

colorInJavaCodeThread

CodeEditorFrame.ColorInJavaCodeThread colorInJavaCodeThread

textSize

protected int textSize

save

CodeEditorFrame.SaveCheckAction save

lineNumber

int lineNumber

position

int position

longestLine

static int longestLine

textPaneText

java.lang.String textPaneText

DEBUG

public static boolean DEBUG

PRINT_ERROR_STACKS

public static boolean PRINT_ERROR_STACKS

SET_ACCESSIBLE

public static boolean SET_ACCESSIBLE

SYNTAX_COLOURING

public boolean SYNTAX_COLOURING

LOW_MEMORY

protected boolean LOW_MEMORY

SLOW_CPU

protected boolean SLOW_CPU

ARRAY_EDITING_MODE

protected boolean ARRAY_EDITING_MODE

CLASS_EDITING_MODE

protected boolean CLASS_EDITING_MODE

instanceMode

protected boolean instanceMode

groupMode

protected boolean groupMode

classMode

protected boolean classMode

defaultDirectory

protected java.lang.String defaultDirectory

errorColor

protected java.awt.Color errorColor

keywordColor

protected java.awt.Color keywordColor

quotesColor

protected java.awt.Color quotesColor

commentsColor

protected java.awt.Color commentsColor

originalDefaultCursorMainFrame

protected java.awt.Cursor originalDefaultCursorMainFrame

originalDefaultCursorSplitPane

protected java.awt.Cursor originalDefaultCursorSplitPane

originalDefaultCursorTextPane

protected java.awt.Cursor originalDefaultCursorTextPane

treeSize

protected int treeSize

localGraphicsEnvironment

protected java.awt.GraphicsEnvironment localGraphicsEnvironment

windowHeight

protected int windowHeight

windowWidth

protected int windowWidth

center

protected java.awt.Point center

windowTopLeftCornerX

protected int windowTopLeftCornerX

windowTopLeftCornerY

protected int windowTopLeftCornerY

menuBar

protected javax.swing.JMenuBar menuBar

popupFile

protected javax.swing.JPopupMenu popupFile

popupEdit

protected javax.swing.JPopupMenu popupEdit

setAccessibleCheckBox

protected javax.swing.JCheckBoxMenuItem setAccessibleCheckBox

colorCodeCheckBox

protected javax.swing.JCheckBoxMenuItem colorCodeCheckBox

printStackTraceCheckBox

protected javax.swing.JCheckBoxMenuItem printStackTraceCheckBox

instanceModeCheckBox

protected javax.swing.JCheckBoxMenuItem instanceModeCheckBox

groupModeCheckBox

protected javax.swing.JCheckBoxMenuItem groupModeCheckBox

classModeCheckBox

protected javax.swing.JCheckBoxMenuItem classModeCheckBox

smallestTreeCheckBox

protected javax.swing.JCheckBoxMenuItem smallestTreeCheckBox

smallerTreeCheckBox

protected javax.swing.JCheckBoxMenuItem smallerTreeCheckBox

mediumTreeCheckBox

protected javax.swing.JCheckBoxMenuItem mediumTreeCheckBox

largerTreeCheckBox

protected javax.swing.JCheckBoxMenuItem largerTreeCheckBox

largestTreeCheckBox

protected javax.swing.JCheckBoxMenuItem largestTreeCheckBox

smallestTextCheckBox

protected javax.swing.JCheckBoxMenuItem smallestTextCheckBox

smallerTextCheckBox

protected javax.swing.JCheckBoxMenuItem smallerTextCheckBox

mediumTextCheckBox

protected javax.swing.JCheckBoxMenuItem mediumTextCheckBox

largerTextCheckBox

protected javax.swing.JCheckBoxMenuItem largerTextCheckBox

largestTextCheckBox

protected javax.swing.JCheckBoxMenuItem largestTextCheckBox

horizontalSliderCheckBox

protected javax.swing.JCheckBoxMenuItem horizontalSliderCheckBox

verticalSliderCheckBox

protected javax.swing.JCheckBoxMenuItem verticalSliderCheckBox

newAction

protected CodeEditorFrame.NewAction newAction

openAction

protected CodeEditorFrame.OpenAction openAction

pageSetupAction

protected CodeEditorFrame.PageSetupAction pageSetupAction

printAction

protected CodeEditorFrame.PrintAction printAction

redoAction

protected CodeEditorFrame.RedoAction redoAction

replaceAction

protected CodeEditorFrame.ReplaceAction replaceAction

saveAction

protected CodeEditorFrame.SaveAction saveAction

saveAsAction

protected CodeEditorFrame.SaveAsAction saveAsAction

setAccessibleAction

protected CodeEditorFrame.SetAccessibleAction setAccessibleAction

colorCodeAction

protected CodeEditorFrame.CodeSyntaxColouringAction colorCodeAction

printStackTraceAction

protected CodeEditorFrame.PrintStackTraceAction printStackTraceAction

findAction

protected CodeEditorFrame.FindAction findAction

cutAction

protected CodeEditorFrame.CutAction cutAction

copyAction

protected CodeEditorFrame.CopyAction copyAction

pasteAction

protected CodeEditorFrame.PasteAction pasteAction

selectAllAction

protected CodeEditorFrame.SelectAllAction selectAllAction

evalSelection

protected CodeEditorFrame.EvaluateSelectedTextAction evalSelection

evalTextPane

protected CodeEditorFrame.EvaluateTextAreaAction evalTextPane

backAction

protected CodeEditorFrame.BackAction backAction

forwardsAction

protected CodeEditorFrame.ForwardsAction forwardsAction

recycleAction

protected CodeEditorFrame.RecycleAction recycleAction

exitAction

protected CodeEditorFrame.ExitAction exitAction

instanceModeAction

protected CodeEditorFrame.InstanceModeAction instanceModeAction

groupModeAction

protected CodeEditorFrame.GroupModeAction groupModeAction

classModeAction

protected CodeEditorFrame.ClassModeAction classModeAction

helpAction

protected CodeEditorFrame.ShowHelpManualAction helpAction

aboutAction

protected CodeEditorFrame.ShowAboutAction aboutAction

licenseAction

protected CodeEditorFrame.ShowLicenseAction licenseAction

closeAction

protected CodeEditorFrame.CloseAction closeAction

undoAction

protected CodeEditorFrame.UndoAction undoAction

stopAction

protected CodeEditorFrame.CodeEvaluationThread stopAction

smallestTreeAction

protected CodeEditorFrame.SmallestTreeAction smallestTreeAction

smallerTreeAction

protected CodeEditorFrame.SmallerTreeAction smallerTreeAction

mediumTreeAction

protected CodeEditorFrame.MediumTreeAction mediumTreeAction

largerTreeAction

protected CodeEditorFrame.LargerTreeAction largerTreeAction

largestTreeAction

protected CodeEditorFrame.LargestTreeAction largestTreeAction

smallestTextAction

protected CodeEditorFrame.SmallestTextAction smallestTextAction

smallerTextAction

protected CodeEditorFrame.SmallerTextAction smallerTextAction

mediumTextAction

protected CodeEditorFrame.MediumTextAction mediumTextAction

largerTextAction

protected CodeEditorFrame.LargerTextAction largerTextAction

largestTextAction

protected CodeEditorFrame.LargestTextAction largestTextAction

horizontalSliderAction

protected CodeEditorFrame.HorizontalSliderAction horizontalSliderAction

verticalSliderAction

protected CodeEditorFrame.VerticalSliderAction verticalSliderAction

swapPanesAction

protected CodeEditorFrame.SwapPanesAction swapPanesAction

switchedAction

protected CodeEditorFrame.SwitchedAction switchedAction

isTopPaneField

boolean isTopPaneField

printingPane

protected javax.swing.JTextPane printingPane

printJob

protected java.awt.print.PrinterJob printJob

pageFormat

protected java.awt.print.PageFormat pageFormat

treeRenderer

protected CodeEditorFrame.TreeClassCellRenderer treeRenderer

undoManager

protected CodeEditorFrame.IgnoringStyleUndoManager undoManager

mouseHandler

protected CodeEditorFrame.MouseHandler mouseHandler

chooser

protected javax.swing.JFileChooser chooser

filter

protected SourceFileFilter filter

FIELDS

protected static final java.lang.String FIELDS
See Also:
Constant Field Values

METHODS

protected static final java.lang.String METHODS
See Also:
Constant Field Values

codeEditorFrame

protected CodeEditorFrame codeEditorFrame

contentPanel

protected javax.swing.JPanel contentPanel

treeScrollPane

protected javax.swing.JScrollPane treeScrollPane

treeScrollPaneWrapper

protected javax.swing.JPanel treeScrollPaneWrapper

textPane

protected PrintableJTextPane textPane

textScrollPane

protected javax.swing.JScrollPane textScrollPane

textScrollPaneWrapper

protected javax.swing.JPanel textScrollPaneWrapper

splitPane

protected javax.swing.JSplitPane splitPane

findReplaceDialog

protected CodeEditorFrame.FindDialog findReplaceDialog

statusBar

protected javax.swing.JPanel statusBar

toolBar

protected javax.swing.JToolBar toolBar

fieldValueDisplayWindow

protected javax.swing.JWindow fieldValueDisplayWindow

editMode

protected java.lang.String editMode

lineNoString

protected java.lang.String lineNoString

lineNoLabel

protected javax.swing.JLabel lineNoLabel

modifiedString

protected java.lang.String modifiedString

modifiedLabel

protected javax.swing.JLabel modifiedLabel

switchedLabel

protected javax.swing.JLabel switchedLabel

modeLabel

protected javax.swing.JLabel modeLabel

undoString

protected java.lang.String undoString

undoLabel

protected javax.swing.JLabel undoLabel

redoString

protected java.lang.String redoString

redoLabel

protected javax.swing.JLabel redoLabel

messageString

protected java.lang.String messageString

messageLabel

protected javax.swing.JLabel messageLabel

superClassLevel

protected int superClassLevel
Constructor Detail

CodeEditorFrame

private CodeEditorFrame()

CodeEditorFrame

public CodeEditorFrame(java.lang.Object precompiledObject,
                       boolean slow_cpu,
                       boolean low_memory,
                       boolean debug,
                       boolean setAccessible,
                       boolean syntaxColouring)
                throws NotPrecompiledException

CodeEditorFrame

public CodeEditorFrame(java.lang.Object precompiledObject)
                throws NotPrecompiledException
Constructors a text view for displaying and editing a text model

Method Detail

main

public static void main(java.lang.String[] args)
                 throws NotPrecompiledException
Used for testing

Parameters:
args - input String array for command line parameters
NotPrecompiledException

startSetup

protected void startSetup(java.lang.Object precompiledObject)
                   throws NotPrecompiledException
NotPrecompiledException

loadArray

protected void loadArray(rjce_precompiled[] objArray,
                         java.lang.String type)

reSetDefaultCursors

protected void reSetDefaultCursors()

setDefaultDirectory

protected void setDefaultDirectory()

loadNewClass

protected void loadNewClass(rjce_precompiled oldObj,
                            rjce_precompiled[] objArray)
                     throws java.lang.NullPointerException
java.lang.NullPointerException

setUpMainFrame

protected void setUpMainFrame()
Setup main editor frame


processWindowEvent

protected void processWindowEvent(java.awt.event.WindowEvent e)
Overrides:
processWindowEvent in class javax.swing.JFrame

setUpActions

protected void setUpActions()
Setup actions for the menu bar and tool bar


setUpMenuBar

protected void setUpMenuBar()
Setup menu bar


addActions

protected javax.swing.JMenu addActions(javax.swing.Action[] actions,
                                       javax.swing.JMenu menu)

setUpStatusBar

protected void setUpStatusBar()
Setup status bar


setUpToolBar

protected void setUpToolBar()
Setup tool bars


addActions

protected javax.swing.JToolBar addActions(javax.swing.Action[] actions,
                                          javax.swing.JToolBar toolBar)

setUpPopupMenu

protected void setUpPopupMenu()
Setup popup menus


addActions

protected javax.swing.JPopupMenu addActions(javax.swing.Action[] actions,
                                            javax.swing.JPopupMenu popupMenu)

setUpSplitPane

protected void setUpSplitPane()
Setup text area for editing java source


setUpTextPane

protected void setUpTextPane()
Setup text area for editing java source


setUpTree

protected javax.swing.JPanel setUpTree()
Setup tree view for object browsing


loadClassFromTree

protected void loadClassFromTree(javax.swing.tree.TreeNode node,
                                 java.lang.String innerClassName)
                          throws java.lang.IllegalAccessException,
                                 java.lang.InstantiationException,
                                 java.lang.reflect.InvocationTargetException,
                                 java.lang.IllegalArgumentException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentException

loadImports

protected void loadImports()

reSetStatusBarAndTexPaneAccordingToCurentStatus

protected void reSetStatusBarAndTexPaneAccordingToCurentStatus(java.lang.String codeToLoad)

handlePrecompiledObjectArrayLoading

protected void handlePrecompiledObjectArrayLoading(rjce_precompiled[] objArray,
                                                   java.lang.String type,
                                                   java.lang.Object fieldObj)

runFieldDisplayTask

protected void runFieldDisplayTask(java.lang.String str)

addClassToTree

protected void addClassToTree(java.lang.Class clazz,
                              javax.swing.tree.DefaultMutableTreeNode additionNode,
                              boolean isEditable,
                              boolean isInterface,
                              boolean isFirstPass,
                              boolean innerClass)

warnUser

protected void warnUser(java.lang.String message)
Displays a warning message on a Small popup frame which contains an OK button and an error icon

Parameters:
message - a String which contains the message that is displayed

warnUserDEBUGTESTER

protected void warnUserDEBUGTESTER(java.lang.String[] message,
                                   boolean hello)

getConformation

protected boolean getConformation(java.lang.String message)
Displays a message for conformation on a Small popup frame which contains OK & CANCEL buttons and a question icon

Parameters:
message - a String which contains the message that is displayed
Returns:
true if user selects "ok" or false otherwise

getYesNoCancelAnswer

protected int getYesNoCancelAnswer(java.lang.String message)
Displays a message for conformation on a Small popup frame which contains OK & CANCEL buttons and a question icon

Parameters:
message - a String which contains the message that is displayed
Returns:
true if user selects "ok" or false otherwise

getYesNoAnswer

protected boolean getYesNoAnswer(java.lang.String message)
Displays a message for conformation on a Small popup frame which contains OK & CANCEL buttons and a question icon

Parameters:
message - a String which contains the message that is displayed
Returns:
true if user selects "ok" or false otherwise

setSelection

protected void setSelection(int xStart,
                            int xFinish,
                            boolean moveUp)

saveArraysBackToObject

protected void saveArraysBackToObject(rjce_precompiled oldObj,
                                      rjce_precompiled[] objArray)

getIdentifiersAndInnerClasses

protected void getIdentifiersAndInnerClasses(java.util.Set identifiers,
                                             java.util.Map innerClasses,
                                             java.lang.Class clas)

findMatchIngoringSpacesAndSelect

protected int findMatchIngoringSpacesAndSelect(java.lang.String searchStr,
                                               java.lang.String keyStr)

getParametersFromTypes

protected java.lang.Object[] getParametersFromTypes(java.lang.Class[] parameterTypes,
                                                    java.lang.String methodName,
                                                    boolean isClass)

getConstructors

protected java.lang.reflect.Constructor[] getConstructors(java.lang.String unQualifiedType,
                                                          java.util.Collection constructors)

warnUserOfExecutionError

protected void warnUserOfExecutionError(java.lang.String exceptionName,
                                        java.lang.String exceptionMessage,
                                        java.lang.Throwable exceptionCause)

setSelectionFromTokenANLTR

protected void setSelectionFromTokenANLTR(int line,
                                          int column,
                                          java.lang.String tokenName,
                                          java.awt.Color color)
Set the caret position in the text pane

Parameters:
line - the line
column - the column

getTextPosition

protected int getTextPosition(int line,
                              int column,
                              java.lang.String input)

setSelectionFromToken

protected void setSelectionFromToken(int line,
                                     int column,
                                     java.lang.String tokenName,
                                     java.awt.Color color)
Set the caret position in the text pane

Parameters:
line - the line
column - the column

upDateMode

protected void upDateMode()