Package editor

Class EditorHost

All Implemented Interfaces:
IEditorHost, ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
GosuEditor, StandardEditor

public abstract class EditorHost extends JPanel implements IEditorHost
See Also:
  • Field Details

  • Method Details

    • getScriptPart

      public IScriptPartId getScriptPart()
      Specified by:
      getScriptPart in interface IEditorHost
    • setScriptPart

      public void setScriptPart(IScriptPartId partId)
      Specified by:
      setScriptPart in interface IEditorHost
    • getUndoManager

      public AtomicUndoManager getUndoManager()
      Specified by:
      getUndoManager in interface IEditorHost
    • read

      public void read(IScriptPartId partId, String strSource) throws IOException
      Specified by:
      read in interface IEditorHost
      Throws:
      IOException
    • parseAndWaitForParser

      public void parseAndWaitForParser()
    • waitForParser

      public void waitForParser()
    • addKeyHandlers

      protected void addKeyHandlers()
    • showFileInTree

      public void showFileInTree()
    • getLineNumberAtCaret

      public int getLineNumberAtCaret()
    • getLineOffset

      public int getLineOffset(int iLine)
    • setLabel

      public void setLabel(String label)
      Specified by:
      setLabel in interface IEditorHost
    • getDocument

      public AbstractDocument getDocument()
      Specified by:
      getDocument in interface IEditorHost
    • setUndoableEditListener

      public void setUndoableEditListener(UndoableEditListener uel)
      Sets the one and only undoable edit listener for this editor section. The primary use case for this method is to establish an undo manager connection.
      Specified by:
      setUndoableEditListener in interface IEditorHost
      Parameters:
      uel - The UndoableEditListener to connect to this section's document.
    • addDocumentListener

      protected void addDocumentListener()
    • getText

      public String getText()
      Specified by:
      getText in interface IEditorHost
    • getParsedClass

      public IType getParsedClass()
      Specified by:
      getParsedClass in interface IEditorHost
    • getCompletionPopup

      public JPopupMenu getCompletionPopup()
    • setCompletionPopup

      public void setCompletionPopup(JPopupMenu completionPopup)
    • isCompletionPopupShowing

      public boolean isCompletionPopupShowing()
    • displayGotoLinePopup

      public void displayGotoLinePopup()
    • gotoLine

      public void gotoLine(int iLine)
    • gotoLine

      public void gotoLine(int iLine, int iColumn)
    • gotoOffset

      public void gotoOffset(int offset)
    • duplicate

      public void duplicate()
    • delete

      public void delete()
      delete the currently selected text, or the current line if nothing is selected
    • getExpandedSelection

      public String getExpandedSelection()
      Returns:
      the selected text in the editor, expanding to the entire current line if no selection exists
    • joinLines

      public void joinLines()
    • centerView

      public void centerView()
    • highlightLocations

      public void highlightLocations(List<SearchLocation> locations)
      Specified by:
      highlightLocations in interface IEditorHost
    • gotoNextUsageHighlight

      public void gotoNextUsageHighlight()
      Specified by:
      gotoNextUsageHighlight in interface IEditorHost
    • gotoPrevUsageHighlight

      public void gotoPrevUsageHighlight()
      Specified by:
      gotoPrevUsageHighlight in interface IEditorHost
    • removeAllHighlights

      public void removeAllHighlights()
      Specified by:
      removeAllHighlights in interface IEditorHost
    • getHighlightMode

      protected EditorHost.HighlightMode getHighlightMode()
    • setHighlightMode

      protected void setHighlightMode(EditorHost.HighlightMode mode)
    • hideMiscPopups

      protected void hideMiscPopups()
    • clipCut

      public void clipCut(Clipboard clipboard)
      Specified by:
      clipCut in interface IEditorHost
    • clipCopy

      public void clipCopy(Clipboard clipboard)
      Specified by:
      clipCopy in interface IEditorHost
    • clipPaste

      public void clipPaste(Clipboard clipboard, boolean asGosu)
      Specified by:
      clipPaste in interface IEditorHost
    • parse

      public void parse()
    • parse

      protected void parse(boolean forceCodeCompletion)
    • postTaskInParserThread

      public static void postTaskInParserThread(Runnable task)
    • getParserTaskQueue

      public static TaskQueue getParserTaskQueue()
    • isParserSuspended

      public boolean isParserSuspended()
    • setParserSuspended

      public void setParserSuspended(boolean bParserSuspended)
    • areAnyParserTasksPending

      public static boolean areAnyParserTasksPending()
    • areMoreThanOneParserTasksPendingForThisEditor

      protected boolean areMoreThanOneParserTasksPendingForThisEditor()
    • areMoreThanOneParserTasksGoingToUpdateContainingType

      protected boolean areMoreThanOneParserTasksGoingToUpdateContainingType()
    • isCompleteCode

      public boolean isCompleteCode()
    • setCompleteCode

      public void setCompleteCode(boolean bCompleteCode)
    • handleDot

      public void handleDot()
    • handleColon

      public void handleColon()
    • handleCompleteCode

      public void handleCompleteCode()
    • handleDot

      protected abstract void handleDot(ISymbolTable transientSymTable)
    • getSymbolTableAtCursor

      public abstract ISymbolTable getSymbolTableAtCursor()
    • waitOnParserThread

      public static void waitOnParserThread()
    • getTimerCount

      public int getTimerCount()
    • waitForIntellisenseTimers

      public static void waitForIntellisenseTimers()
    • isAltDown

      public boolean isAltDown()