public class GosuEditor extends JPanel implements IScriptEditor, IGosuPanel, ITypeLoaderListener
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static int |
CONTROL_KEY_MASK |
static String |
CONTROL_KEY_NAME
Platform dependent keystroke info
|
static String |
INTELLISENSE_TASK_QUEUE |
static int |
MIN_LINENUMBER_WIDTH |
static int |
RESCODE_ERRORS
Parse result code for an invalid parse.
|
static int |
RESCODE_PENDING
Parse result code during parsing.
|
static int |
RESCODE_VALID
Parse result code for a valid parse.
|
static int |
RESCODE_WARNINGS
Parse result code for a valid parse with warnings.
|
static int |
TAB_SIZE
The number of spacess assigned to a tab
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
GosuEditor(ILineInfoManager lineInfoRenderer,
AtomicUndoManager undoMgr,
IScriptabilityModifier scriptabilityConstraint,
IContextMenuHandler<IScriptEditor> contextMenuHandler,
boolean bStatement,
boolean bEmptyTextOk) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, 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, updateadd, 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, validateTreeaction, 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, getPeer, 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, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final String CONTROL_KEY_NAME
public static final int CONTROL_KEY_MASK
public static final String INTELLISENSE_TASK_QUEUE
public static final int RESCODE_VALID
public static final int RESCODE_WARNINGS
public static final int RESCODE_ERRORS
public static final int RESCODE_PENDING
public static final int MIN_LINENUMBER_WIDTH
public static final int TAB_SIZE
public GosuEditor(ILineInfoManager lineInfoRenderer, AtomicUndoManager undoMgr, IScriptabilityModifier scriptabilityConstraint, IContextMenuHandler<IScriptEditor> contextMenuHandler, boolean bStatement, boolean bEmptyTextOk)
public void centerView()
public void displayGotoLinePopup()
public void gotoLine(int iLine)
public void highlightUsagesOfFeatureUnderCaret()
public void highlightUsages(IScriptEditor scriptEditor)
public void gotoNextUsageHighlight()
public void removeAllHighlights()
public void selectWord()
public void selectWordForMouseClick()
public void narrowSelectWord()
public void joinLines()
public void gotoDeclaration()
protected GosuEditorPane createEditorPane()
public JComponent getComponent()
getComponent in interface IScriptEditorpublic SourceType getSourceType()
getSourceType in interface IScriptEditorpublic String getText()
getText in interface IGosuPanelgetText in interface IScriptEditorpublic void setProgram(boolean bProgram)
public void setClass(boolean bClass)
public void setEnhancement(boolean bExtension)
public boolean isProgram()
public boolean isClass()
public boolean isEnhancement()
public boolean isStatement()
public void setStatement(boolean bStatement)
public void setTemplate(boolean bTemplate)
public boolean isTemplate()
public GosuEditorPane getEditor()
getEditor in interface IEditorHostpublic IScriptabilityModifier getScriptabilityModifier()
public ParseResultsException getParseResultsException()
public boolean hasParseResultsException()
public IScriptPartId getScriptPart()
getScriptPart in interface IScriptEditorpublic void read(IScriptPartId partId, String strSource, String strDescription) throws IOException
read in interface IGosuPanelread in interface IScriptEditorIOExceptionpublic void setTestResource(boolean testResource)
public void parse()
parse in interface IGosuPanelparse in interface IScriptEditorpublic static void postTaskInParserThread(Runnable task)
public static TaskQueue getParserTaskQueue()
public boolean isParserSuspended()
public void setParserSuspended(boolean bParserSuspended)
public void duplicate()
public void delete()
public String getExpandedSelection()
public ITypeUsesMap getTypeUsesMapFromMostRecentParse()
public Map<Integer,IFunctionStatement> getFunctionsByLineNumber()
public List<IDynamicFunctionSymbol> getOverriddenFunctions()
protected void clearParseException()
public void setValidator(IGosuValidator validator)
public static boolean areAnyParserTasksPending()
protected void handleParseException(ParseResultsException e, boolean bForceCodeCompletion)
public IGosuParser getParser()
getParser in interface IGosuPanelpublic EditorScrollPane getScroller()
getScroller in interface IScriptEditorpublic IReplaceWordCallback getReplaceWordCallback()
public ISymbolTable getSymbolTable()
getSymbolTable in interface IGosuPanelgetSymbolTable in interface IScriptEditorpublic void resetSymbolTable(ISymbolTable newSymbols)
public void setSymbolTable(ISymbolTable newSymbols)
public AtomicUndoManager getUndoManager()
getUndoManager in interface IScriptEditorpublic void setUndoableEditListener(UndoableEditListener uel)
uel - The UndoableEditListener to connect to this section's document.public void gotoNextError()
gotoNextError in interface IScriptEditorpublic void handleCompleteCode()
handleCompleteCode in interface IScriptEditorpublic boolean displayValueCompletionAtCurrentLocation()
displayValueCompletionAtCurrentLocation in interface IScriptEditorpublic void clipCopyTypeInfoAtCurrentLocation()
public void displayTypeInfoAtCurrentLocation()
public Rectangle getCaretLocation() throws BadLocationException
BadLocationExceptionpublic void extractVariable()
public IType getTypeAtCaretPosition()
public IExpression getExpressionContainingCharacterBeforeCaret()
public ISymbolTable getSymbolTableAtCursor()
protected void displayBeanInfoPopup(int iPosition)
public BeanInfoPopup getBeanInfoPopup()
public void setBeanInfoPopup(BeanInfoPopup beanInfoPopup)
public IValuePopup getValuePopup()
public void setValuePopup(IValuePopup valuePopup)
public boolean isIntellisensePopupShowing()
public void gotoDeclarationAtCursor()
gotoDeclarationAtCursor in interface IScriptEditorpublic String getSelectedText()
getSelectedText in interface IScriptEditorpublic void handleGotoFeature(IFeatureInfo feature)
public void handleGotoLocal(ISymbol symbol, IParsedElement pe)
public void addParseListener(ParseListener parseListener)
public boolean acceptsUses()
public void setAcceptUses(boolean acceptUses)
public int getLineNumberAtCaret()
public void parseAndWaitForParser()
public void waitForParser()
public IParseTree getDeepestLocationAtCaret()
getDeepestLocationAtCaret in interface IScriptEditorpublic IParseTree getDeepestStatementLocationAtCaret()
getDeepestStatementLocationAtCaret in interface IScriptEditorpublic IParseTree getDeepestStatementLocationAtPos(int iPos, boolean bStrict)
public IParseTree getDeepestStatementLocationAtPos(int iPos)
public IParseTree getStatementAtLineAtCaret()
getStatementAtLineAtCaret in interface IScriptEditorpublic IParseTree getStatementAtLine(int iLineNum)
getStatementAtLine in interface IScriptEditorpublic IParseTree getStatementAtLineOrExpression(int iLine)
getStatementAtLineOrExpression in interface IScriptEditorpublic IParseTree getStatementAtLineAtCaretOrExpression()
getStatementAtLineAtCaretOrExpression in interface IScriptEditorpublic IParsedElement getFunctionCallAtCaret()
public IParsedElement findFunction(IParsedElement parsedElement)
public IParsedElement getRootParsedElement()
public int getTimerCount()
public boolean isAltDown()
public SmartFixManager getSmartFixManager()
public void addToUses(String strType)
public void addSpecialFunction(IDynamicFunctionSymbol symbol)
public void addSpecialFunctionHandler(IDynamicFunctionSymbol symbol, Runnable handler)
public void clearSpecialFunctions()
public void makeReadOnly(boolean bReadOnly)
public void setPartId(ScriptPartId scriptPartId)
public void setTypeUsesMap(ITypeUsesMap typeUsesMap)
setTypeUsesMap in interface IGosuPanelpublic void setProgramSuperType(IType baseClass)
setProgramSuperType in interface IGosuPanelpublic IGosuClass getParsedClass()
public static void waitOnParserThread()
public JavadocPopup getJavadocPopup()
public static void waitForIntellisenseTimers()
public void refreshed()
refreshed in interface ITypeLoaderListenerpublic void refreshedTypes(RefreshRequest refreshRequest)
refreshedTypes in interface ITypeLoaderListenerpublic JComponent asJComponent()
asJComponent in interface IGosuPanelpublic void clipCut(Clipboard clipboard)
public void clipCopy(Clipboard clipboard)
public void clipPaste(Clipboard clipboard, boolean asGosu)
Copyright © 2017. All rights reserved.