Package editor

Class SmartFixManager

java.lang.Object
editor.SmartFixManager
All Implemented Interfaces:
KeyListener, MouseMotionListener, EventListener

public class SmartFixManager extends Object implements MouseMotionListener, KeyListener
Handles state and functions relating to smart-fix functionality in the Gosu editor
Author:
cgross
  • Field Details

  • Constructor Details

    • SmartFixManager

      public SmartFixManager(GosuEditor gosuEditor)
  • Method Details

    • performFix

      public void performFix()
    • getEditor

      public JTextComponent getEditor()
    • setEditor

      public void setEditor(JTextComponent editor)
    • getSourceOfIssue

      public IParsedElement getSourceOfIssue()
    • setSourceOfIssue

      public void setSourceOfIssue(IParsedElement sourceOfIssue)
    • getOffset

      public int getOffset()
    • setOffset

      public void setOffset(int offset)
    • getLength

      public int getLength()
    • setLength

      public void setLength(int length)
    • getGosuEditor

      public GosuEditor getGosuEditor()
    • setGosuEditor

      public void setGosuEditor(GosuEditor gosuEditor)
    • updateState

      public void updateState()
      Updates the state of the SmartFixManager, which may display tool tips and offer to fix issues in the gosu program.
    • resetSmartHelpState

      public void resetSmartHelpState()
    • showSmartFix

      public void showSmartFix(int offset, int length, String displayText)
    • getMode

      public SmartFixManager.SmartFixMode getMode()
    • getPossibleTypesToImport

      public Set<String> getPossibleTypesToImport()
    • getPeToFixWithAsStatement

      public IParsedElement getPeToFixWithAsStatement()
    • getJavaStyleCast

      public IParsedElement getJavaStyleCast()
    • getTypeToCoerceTo

      public String getTypeToCoerceTo()
    • mouseDragged

      public void mouseDragged(MouseEvent e)
      Specified by:
      mouseDragged in interface MouseMotionListener
    • mouseMoved

      public void mouseMoved(MouseEvent e)
      Specified by:
      mouseMoved in interface MouseMotionListener
    • keyTyped

      public void keyTyped(KeyEvent e)
      Specified by:
      keyTyped in interface KeyListener
    • keyPressed

      public void keyPressed(KeyEvent e)
      Specified by:
      keyPressed in interface KeyListener
    • keyReleased

      public void keyReleased(KeyEvent e)
      Specified by:
      keyReleased in interface KeyListener
    • isCaseParseIssue

      public static boolean isCaseParseIssue(IParseIssue parseIssue)
    • getReplaceChunk

      public static SmartFixManager.ReplaceChunk getReplaceChunk(IParsedElement sourceOfIssue, String gosuSource)