org.aspectj.tools.ajbrowser.ui
Class BasicEditor

java.lang.Object
  extended by org.aspectj.tools.ajbrowser.ui.BasicEditor
All Implemented Interfaces:
EditorAdapter

public class BasicEditor
extends java.lang.Object
implements EditorAdapter

Bare-bones editor implementation used when the framework is being used standalone.

Author:
Mik Kersten

Constructor Summary
BasicEditor()
           
 
Method Summary
 void addEditorViewForSourceLine(java.lang.String filePath, int lineNumber)
           
 void clearBreakpointRequest(java.lang.String filePath, int lineNumber)
           
 java.lang.String getCurrFile()
           
 java.lang.String getCurrSourceFilePath()
           
 javax.swing.JPanel getPanel()
           
 void pasteToCaretPos(java.lang.String text)
          Paste text into the current caret position of the editor.
 void saveContents()
          Save the contents of the current file being edited.
 void setBreakpointRequest(java.lang.String filePath, int lineNumber, boolean isDeferred)
           
 void showSourceForFile(java.lang.String filePath)
           
 void showSourceForLine(int lineNumber, boolean highlight)
           
 void showSourceForSourceLine(java.lang.String filePath, int lineNumber, boolean highlight)
           
 void showSourceLine(int lineNumber, boolean highlight)
          Seek the editor to a source line in the current file.
 void showSourceLine(ISourceLocation sourceLocation, boolean highlight)
          Seek the editor to a SourceLocation and highlight if specified.
 void showSourceLine(java.lang.String filePath, int lineNumber, boolean highlight)
          Seek the editor to a source line in the file specified.
 void showSourcelineAnnotation(java.lang.String filePath, int lineNumber, java.util.List items)
          Not implemented.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicEditor

public BasicEditor()
Method Detail

getCurrFile

public java.lang.String getCurrFile()
Specified by:
getCurrFile in interface EditorAdapter
Returns:
full path to the file currently being edited.

showSourceLine

public void showSourceLine(ISourceLocation sourceLocation,
                           boolean highlight)
Description copied from interface: EditorAdapter
Seek the editor to a SourceLocation and highlight if specified.

Specified by:
showSourceLine in interface EditorAdapter

showSourceLine

public void showSourceLine(int lineNumber,
                           boolean highlight)
Description copied from interface: EditorAdapter
Seek the editor to a source line in the current file.

Specified by:
showSourceLine in interface EditorAdapter

pasteToCaretPos

public void pasteToCaretPos(java.lang.String text)
Description copied from interface: EditorAdapter
Paste text into the current caret position of the editor.

Specified by:
pasteToCaretPos in interface EditorAdapter

showSourceLine

public void showSourceLine(java.lang.String filePath,
                           int lineNumber,
                           boolean highlight)
Description copied from interface: EditorAdapter
Seek the editor to a source line in the file specified.

Specified by:
showSourceLine in interface EditorAdapter

showSourcelineAnnotation

public void showSourcelineAnnotation(java.lang.String filePath,
                                     int lineNumber,
                                     java.util.List items)
Not implemented.

Specified by:
showSourcelineAnnotation in interface EditorAdapter
Parameters:
filePath - path to the file that should get the annotation
lineNumber - line number for the annotation
items - list of relations to be rendered as the annotation

addEditorViewForSourceLine

public void addEditorViewForSourceLine(java.lang.String filePath,
                                       int lineNumber)

saveContents

public void saveContents()
                  throws java.io.IOException
Description copied from interface: EditorAdapter
Save the contents of the current file being edited.

Specified by:
saveContents in interface EditorAdapter
Throws:
java.io.IOException

getPanel

public javax.swing.JPanel getPanel()

showSourceForFile

public void showSourceForFile(java.lang.String filePath)

showSourceForLine

public void showSourceForLine(int lineNumber,
                              boolean highlight)

showSourceForSourceLine

public void showSourceForSourceLine(java.lang.String filePath,
                                    int lineNumber,
                                    boolean highlight)

getCurrSourceFilePath

public java.lang.String getCurrSourceFilePath()

setBreakpointRequest

public void setBreakpointRequest(java.lang.String filePath,
                                 int lineNumber,
                                 boolean isDeferred)

clearBreakpointRequest

public void clearBreakpointRequest(java.lang.String filePath,
                                   int lineNumber)