Package editor

Class GosuPanel

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

    public class GosuPanel
    extends javax.swing.JPanel
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) class  GosuPanel.RedoActionHandler  
      (package private) class  GosuPanel.SysInListener  
      (package private) class  GosuPanel.UndoActionHandler  
      • Nested classes/interfaces inherited from class javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Constructor Summary

      Constructors 
      Constructor Description
      GosuPanel​(javax.swing.JFrame frame)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addBusySignal​(RunState runState)  
      private void addDirtyListener​(EditorHost editor)  
      private void addIssueKeyMarkers​(java.lang.String[] strLines, java.util.List<java.lang.Integer> lines, java.util.Map<java.lang.Integer,​java.util.List<java.lang.String>> map)  
      boolean canGoBackward()  
      boolean canGoForward()  
      void clearDebugger()  
      void clearOutput()  
      void clearTabs()  
      private void closeActiveEditor()  
      private void closeOthers()  
      void closeTab​(java.nio.file.Path file)  
      boolean compile​(java.util.Set<IType> types)  
      (package private) void configUI()  
      private EditorHost createEditor​(java.nio.file.Path file, IScriptPartId partId)  
      void debug​(IRunConfig runConfig)  
      private void displayClasspath()  
      void displayRecentViewsPopup()  
      void dumpBytecode()  
      void execute​(IRunConfig runConfig)  
      void exit()  
      EditorHost findTab​(java.nio.file.Path file)  
      BreakpointManager getBreakpointManager()  
      private IGosuClass getClassAtCaret()  
      java.awt.datatransfer.Clipboard getClipboard()  
      SystemPanel getConsolePanel()  
      EditorHost getCurrentEditor()  
      java.nio.file.Path getCurrentFile()  
      GosuEditor getCurrentGosuEditor()  
      Debugger getDebugger()  
      DebugPanel getDebugPanel()  
      TabPane getEditorTabPane()  
      Experiment getExperiment()  
      ExperimentView getExperimentView()  
      EditorHost getGosuEditor()  
      private GosuPanel getGosuPanel()  
      MessagesPanel getMessagesPanel()  
      java.util.List<FileTree> getOpenFilesInProject()  
      IRunConfig getRunConfig()  
      SearchPanel getSearchPanel()  
      NavigationHistory getTabSelectionHistory()  
      TypeNameCache getTypeNamesCache()  
      AtomicUndoManager getUndoManager()  
      void goBackward()  
      void goForward()  
      private void handleDebuggerStateChange()  
      private void handleMacStuff()  
      boolean isDebugging()  
      boolean isDirty​(EditorHost editor)  
      boolean isRunning()  
      private boolean isValidGosuSourceFile​(java.nio.file.Path file)  
      private java.lang.String joinLines​(java.lang.String[] strLines)  
      void jumptToBreakpoint​(com.sun.jdi.Location location, boolean bFocus)  
      void killProcess()  
      boolean make()  
      private void makeBuildMenu​(javax.swing.JMenuBar menuBar)  
      private void makeCodeMenu​(javax.swing.JMenuBar menuBar)  
      void makeDebugger​(com.sun.jdi.VirtualMachine vm)  
      private void makeEditMenu​(javax.swing.JMenuBar menuBar)  
      private void makeFileMenu​(javax.swing.JMenuBar menuBar)  
      private void makeHelpMenu​(javax.swing.JMenuBar menuBar)  
      private java.lang.String makeIssueString​(java.util.List<java.lang.String> issues)  
      private ToolBar makeMainToolbar()  
      private javax.swing.JMenuBar makeMenuBar()  
      static IScriptPartId makePartId​(java.nio.file.Path file)  
      private void makeRunMenu​(javax.swing.JMenuBar menuBar)  
      private void makeSearchMenu​(javax.swing.JMenuBar menuBar)  
      private javax.swing.JComponent makeSeparator()  
      private javax.swing.JPanel makeStatusBar()  
      private void makeWindowMenu​(javax.swing.JMenuBar menuBar)  
      private void mapKeystroke​(javax.swing.KeyStroke ks, java.lang.String strCmd, javax.swing.Action action)  
      private void mapKeystrokes()  
      private void markErrorsForGosuLanguageTest()  
      void newExperiment()  
      void openExperiment()  
      void openExperiment​(java.nio.file.Path experimentDir)  
      void openFile()  
      private void openFile​(IScriptPartId partId, java.nio.file.Path file, boolean bFocus)  
      void openFile​(java.nio.file.Path file, boolean bFocus)  
      void openInitialFile​(IScriptPartId partId, java.nio.file.Path file)  
      private boolean openTab​(java.nio.file.Path file, boolean bFocus)  
      boolean openType​(java.lang.String fqn, boolean bFocus)  
      private void parse()  
      void pipeInput()  
      boolean rebuild()  
      void refresh​(java.nio.file.Path file)
      This should only be called when either the file's contents change externally, or when the file saves to disk.
      (package private) void reload​(IType type)  
      void removeBusySignal()  
      private void removeLruTab()  
      private void removeOldIssueKeyMarkers​(java.lang.String[] lines)  
      (package private) void resetChangeHandler()  
      void restoreExperimentState​(Experiment experiment)  
      boolean save()  
      boolean save​(java.nio.file.Path file, EditorHost editor)  
      private void saveAndReloadType​(java.nio.file.Path file, EditorHost editor)  
      void saveAs()  
      boolean saveIfDirty()  
      private void savePreviousTab()  
      void selectTab​(java.nio.file.Path file)  
      private void setCurrentFile​(java.nio.file.Path file)  
      void setDirty​(EditorHost editor, boolean bDirty)  
      void setEditorSplitPosition​(int iPos)  
      void setExperimentSplitPosition​(int iPos)  
      void setStatus​(java.lang.String status)  
      void shipIt()  
      SystemPanel showConsole​(boolean bShow)  
      void showDebugger​(boolean bShow)  
      MessagesPanel showMessages​(boolean bShow)  
      SearchPanel showSearches​(boolean bShow)  
      <P extends javax.swing.JComponent>
      P
      showTab​(boolean bShow, java.lang.String title, javax.swing.Icon icon, P panel, java.util.function.Supplier<P> creator)  
      private void storeExperimentState()  
      private void updateTitle()  
      • Methods inherited from class javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GosuPanel

        public GosuPanel​(javax.swing.JFrame frame)
    • Method Detail

      • configUI

        void configUI()
      • makeMainToolbar

        private ToolBar makeMainToolbar()
      • makeSeparator

        private javax.swing.JComponent makeSeparator()
      • getConsolePanel

        public SystemPanel getConsolePanel()
      • getDebugPanel

        public DebugPanel getDebugPanel()
      • showMessages

        public MessagesPanel showMessages​(boolean bShow)
      • showSearches

        public SearchPanel showSearches​(boolean bShow)
      • showConsole

        public SystemPanel showConsole​(boolean bShow)
      • showTab

        public <P extends javax.swing.JComponent> P showTab​(boolean bShow,
                                                            java.lang.String title,
                                                            javax.swing.Icon icon,
                                                            P panel,
                                                            java.util.function.Supplier<P> creator)
      • handleMacStuff

        private void handleMacStuff()
      • clearTabs

        public void clearTabs()
      • storeExperimentState

        private void storeExperimentState()
      • getExperiment

        public Experiment getExperiment()
      • restoreExperimentState

        public void restoreExperimentState​(Experiment experiment)
      • makeStatusBar

        private javax.swing.JPanel makeStatusBar()
      • setStatus

        public void setStatus​(java.lang.String status)
      • parse

        private void parse()
      • savePreviousTab

        private void savePreviousTab()
      • addDirtyListener

        private void addDirtyListener​(EditorHost editor)
      • makeMenuBar

        private javax.swing.JMenuBar makeMenuBar()
      • makeHelpMenu

        private void makeHelpMenu​(javax.swing.JMenuBar menuBar)
      • makeWindowMenu

        private void makeWindowMenu​(javax.swing.JMenuBar menuBar)
      • makeCodeMenu

        private void makeCodeMenu​(javax.swing.JMenuBar menuBar)
      • getCurrentGosuEditor

        public GosuEditor getCurrentGosuEditor()
      • makeBuildMenu

        private void makeBuildMenu​(javax.swing.JMenuBar menuBar)
      • getCurrentEditor

        public EditorHost getCurrentEditor()
      • makeRunMenu

        private void makeRunMenu​(javax.swing.JMenuBar menuBar)
      • makeSearchMenu

        private void makeSearchMenu​(javax.swing.JMenuBar menuBar)
      • getGosuPanel

        private GosuPanel getGosuPanel()
      • makeEditMenu

        private void makeEditMenu​(javax.swing.JMenuBar menuBar)
      • makeFileMenu

        private void makeFileMenu​(javax.swing.JMenuBar menuBar)
      • closeActiveEditor

        private void closeActiveEditor()
      • closeOthers

        private void closeOthers()
      • displayClasspath

        private void displayClasspath()
      • shipIt

        public void shipIt()
      • make

        public boolean make()
      • compile

        public boolean compile​(java.util.Set<IType> types)
      • rebuild

        public boolean rebuild()
      • exit

        public void exit()
      • setEditorSplitPosition

        public void setEditorSplitPosition​(int iPos)
      • setExperimentSplitPosition

        public void setExperimentSplitPosition​(int iPos)
      • getGosuEditor

        public EditorHost getGosuEditor()
      • mapKeystrokes

        private void mapKeystrokes()
      • mapKeystroke

        private void mapKeystroke​(javax.swing.KeyStroke ks,
                                  java.lang.String strCmd,
                                  javax.swing.Action action)
      • resetChangeHandler

        void resetChangeHandler()
      • openFile

        public void openFile()
      • openFile

        public void openFile​(java.nio.file.Path file,
                             boolean bFocus)
      • openType

        public boolean openType​(java.lang.String fqn,
                                boolean bFocus)
      • makePartId

        public static IScriptPartId makePartId​(java.nio.file.Path file)
      • openInitialFile

        public void openInitialFile​(IScriptPartId partId,
                                    java.nio.file.Path file)
      • openFile

        private void openFile​(IScriptPartId partId,
                              java.nio.file.Path file,
                              boolean bFocus)
      • removeLruTab

        private void removeLruTab()
      • updateTitle

        private void updateTitle()
      • openTab

        private boolean openTab​(java.nio.file.Path file,
                                boolean bFocus)
      • findTab

        public EditorHost findTab​(java.nio.file.Path file)
      • setCurrentFile

        private void setCurrentFile​(java.nio.file.Path file)
      • getCurrentFile

        public java.nio.file.Path getCurrentFile()
      • save

        public boolean save()
      • save

        public boolean save​(java.nio.file.Path file,
                            EditorHost editor)
      • saveAndReloadType

        private void saveAndReloadType​(java.nio.file.Path file,
                                       EditorHost editor)
      • reload

        void reload​(IType type)
      • saveIfDirty

        public boolean saveIfDirty()
      • refresh

        public void refresh​(java.nio.file.Path file)
        This should only be called when either the file's contents change externally, or when the file saves to disk.
      • newExperiment

        public void newExperiment()
      • openExperiment

        public void openExperiment()
      • openExperiment

        public void openExperiment​(java.nio.file.Path experimentDir)
      • isValidGosuSourceFile

        private boolean isValidGosuSourceFile​(java.nio.file.Path file)
      • saveAs

        public void saveAs()
      • dumpBytecode

        public void dumpBytecode()
      • getClassAtCaret

        private IGosuClass getClassAtCaret()
      • execute

        public void execute​(IRunConfig runConfig)
      • debug

        public void debug​(IRunConfig runConfig)
      • isRunning

        public boolean isRunning()
      • isDebugging

        public boolean isDebugging()
      • addBusySignal

        public void addBusySignal​(RunState runState)
      • pipeInput

        public void pipeInput()
      • killProcess

        public void killProcess()
      • getDebugger

        public Debugger getDebugger()
      • clearDebugger

        public void clearDebugger()
      • makeDebugger

        public void makeDebugger​(com.sun.jdi.VirtualMachine vm)
      • handleDebuggerStateChange

        private void handleDebuggerStateChange()
      • jumptToBreakpoint

        public void jumptToBreakpoint​(com.sun.jdi.Location location,
                                      boolean bFocus)
      • showDebugger

        public void showDebugger​(boolean bShow)
      • getEditorTabPane

        public TabPane getEditorTabPane()
      • getOpenFilesInProject

        public java.util.List<FileTree> getOpenFilesInProject()
      • removeBusySignal

        public void removeBusySignal()
      • clearOutput

        public void clearOutput()
      • selectTab

        public void selectTab​(java.nio.file.Path file)
      • closeTab

        public void closeTab​(java.nio.file.Path file)
      • goBackward

        public void goBackward()
      • canGoBackward

        public boolean canGoBackward()
      • goForward

        public void goForward()
      • canGoForward

        public boolean canGoForward()
      • displayRecentViewsPopup

        public void displayRecentViewsPopup()
      • isDirty

        public boolean isDirty​(EditorHost editor)
      • setDirty

        public void setDirty​(EditorHost editor,
                             boolean bDirty)
      • getClipboard

        public java.awt.datatransfer.Clipboard getClipboard()
      • markErrorsForGosuLanguageTest

        private void markErrorsForGosuLanguageTest()
      • joinLines

        private java.lang.String joinLines​(java.lang.String[] strLines)
      • removeOldIssueKeyMarkers

        private void removeOldIssueKeyMarkers​(java.lang.String[] lines)
      • addIssueKeyMarkers

        private void addIssueKeyMarkers​(java.lang.String[] strLines,
                                        java.util.List<java.lang.Integer> lines,
                                        java.util.Map<java.lang.Integer,​java.util.List<java.lang.String>> map)
      • makeIssueString

        private java.lang.String makeIssueString​(java.util.List<java.lang.String> issues)