Package editor

Class GosuEditor

    • Method Detail

      • getDocHandler

        public javax.swing.event.DocumentListener getDocHandler()
        Specified by:
        getDocHandler in interface IEditorHost
      • isAccessAll

        public boolean isAccessAll()
      • setAccessAll

        public void setAccessAll​(boolean accessPrivateMembers)
      • getExpectedType

        public IType getExpectedType()
      • setExpectedType

        public void setExpectedType​(IType type)
      • highlightUsagesOfFeatureUnderCaret

        public void highlightUsagesOfFeatureUnderCaret()
      • selectWord

        public void selectWord()
      • selectWordForMouseClick

        public void selectWordForMouseClick()
      • narrowSelectWord

        public void narrowSelectWord()
      • isCaretInEditor

        private boolean isCaretInEditor()
      • setProgram

        public void setProgram​(boolean bProgram)
      • setClass

        public void setClass​(boolean bClass)
      • setEnhancement

        public void setEnhancement​(boolean bExtension)
      • isProgram

        public boolean isProgram()
      • isClass

        public boolean isClass()
      • isEnhancement

        public boolean isEnhancement()
      • isStatement

        public boolean isStatement()
      • setStatement

        public void setStatement​(boolean bStatement)
      • setTemplate

        public void setTemplate​(boolean bTemplate)
      • isTemplate

        public boolean isTemplate()
      • hasParseResultsException

        public boolean hasParseResultsException()
      • refresh

        public void refresh​(java.lang.String content)
        Specified by:
        refresh in interface IEditorHost
      • setTestResource

        public void setTestResource​(boolean testResource)
      • parse

        public void parse​(java.lang.String strText,
                          boolean forceCodeCompletion,
                          boolean changed)
        Specified by:
        parse in interface IEditorHost
      • showFeedback

        public void showFeedback​(boolean show)
      • getClassType

        private ClassType getClassType()
      • getTypeUsesMapFromMostRecentParse

        public ITypeUsesMap getTypeUsesMapFromMostRecentParse()
        Returns:
        A copy of the type-uses map from the most recent parse. A copy for thread-safety.
      • getFunctionsByLineNumber

        public java.util.Map<java.lang.Integer,​IFunctionStatement> getFunctionsByLineNumber()
      • clearParseException

        protected void clearParseException()
      • setValidator

        public void setValidator​(IGosuValidator validator)
      • handleParseException

        private void handleParseException​(boolean forceCodeCompletion)
      • handleParseException

        protected void handleParseException​(ParseResultsException e,
                                            boolean bForceCodeCompletion)
      • handleCodeCompletion

        private void handleCodeCompletion​(boolean bForceCodeCompletion)
      • findExpectedTypeErrorAtCaret

        public IType findExpectedTypeErrorAtCaret()
      • resetSymbolTable

        public void resetSymbolTable​(ISymbolTable newSymbols)
      • setSymbolTable

        public void setSymbolTable​(ISymbolTable newSymbols)
      • handleDotNow

        void handleDotNow​(ISymbolTable transientSymTable)
      • displayPathCompletion

        void displayPathCompletion​(ISymbolTable transientSymTable)
      • displayPathCompletionPopup

        void displayPathCompletionPopup​(boolean bFeatureLiteralCompletion)
      • clipCopyTypeInfoAtCurrentLocation

        public void clipCopyTypeInfoAtCurrentLocation()
      • displayTypeInfoAtCurrentLocation

        public void displayTypeInfoAtCurrentLocation()
      • getCaretLocation

        public java.awt.Rectangle getCaretLocation()
                                            throws javax.swing.text.BadLocationException
        Throws:
        javax.swing.text.BadLocationException
      • extractVariable

        public void extractVariable()
      • getTypeAtCaretPosition

        public IType getTypeAtCaretPosition()
      • replaceLocationAtCaret

        void replaceLocationAtCaret​(java.lang.String strReplacement)
      • replaceLocation

        void replaceLocation​(IParseTree location,
                             java.lang.String strReplacement)
      • getExpressionAtCaret

        IExpression getExpressionAtCaret()
      • getExpressionAtPos

        IExpression getExpressionAtPos​(int iPos)
      • getPositionAtStartOfExpressionAtCaret

        int getPositionAtStartOfExpressionAtCaret()
      • getExpressionContainingCharacterBeforeCaret

        public IExpression getExpressionContainingCharacterBeforeCaret()
      • getSymbolTableAtOffset

        public ISymbolTable getSymbolTableAtOffset​(int offset)
      • displayCompletionPopup

        protected void displayCompletionPopup​(int iPosition)
      • getPositionFromPoint

        private java.awt.Rectangle getPositionFromPoint​(int iPosition)
                                                 throws javax.swing.text.BadLocationException
        Throws:
        javax.swing.text.BadLocationException
      • isResultOfUndo

        private boolean isResultOfUndo()
      • displayParameterInfoPopup

        public ParameterInfoPopup displayParameterInfoPopup​(int iPosition)
      • gotoDeclaration

        public void gotoDeclaration​(IParsedElement pe)
      • displayJavadocHelp

        void displayJavadocHelp​(IParseTree parseTree)
      • getContextHelp

        java.lang.String getContextHelp​(IParseTree parseTree)
      • getTooltipMessage

        public java.lang.String getTooltipMessage​(java.awt.event.MouseEvent event)
        Specified by:
        getTooltipMessage in interface IEditorHost
      • getIssuesFromPos

        private java.util.List<IParseIssue> getIssuesFromPos​(int iPos)
      • getIssuesNearPos

        private java.util.List<IParseIssue> getIssuesNearPos​(int iPos)
      • getErrorMessagesAt

        private java.lang.String getErrorMessagesAt​(java.util.List parseExceptions)
      • acceptsUses

        public boolean acceptsUses()
      • setAcceptUses

        public void setAcceptUses​(boolean acceptUses)
      • getDeepestLocation

        IParseTree getDeepestLocation​(java.awt.Point pt)
      • getDeepestLocation

        IParseTree getDeepestLocation​(int iPos,
                                      boolean strict)
      • getDeepestLocationSpanning

        IParseTree getDeepestLocationSpanning​(int start,
                                              int end)
      • getDeepestStatementLocationAtPos

        public IParseTree getDeepestStatementLocationAtPos​(int iPos,
                                                           boolean bStrict)
      • getDeepestStatementLocationAtPos

        public IParseTree getDeepestStatementLocationAtPos​(int iPos)
      • getTypeAtLine

        public java.lang.String getTypeAtLine​(int line)
        Specified by:
        getTypeAtLine in interface IEditorHost
      • returnStatementOrExpression

        private IParseTree returnStatementOrExpression​(IParseTree statement)
      • getFunctionCallAtCaret

        public IParsedElement getFunctionCallAtCaret()
      • moveSelectionUp

        void moveSelectionUp()
      • moveSelectionDown

        void moveSelectionDown()
      • smartFix

        private void smartFix()
      • addToUses

        public void addToUses​(java.lang.String strType)
      • makeReadOnly

        public void makeReadOnly​(boolean bReadOnly)
      • asJComponent

        public javax.swing.JComponent asJComponent()
        Specified by:
        asJComponent in interface IGosuPanel