Class CodeEditorFactory.AutoCompileCodeEditor
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
com.jidesoft.editor.CodeEditor
com.inductiveautomation.ignition.designer.scripteditor.component.CodeEditorFactory.AutoCompileCodeEditor
- All Implemented Interfaces:
com.jidesoft.editor.caret.CaretListener,com.jidesoft.editor.LineBreak,com.jidesoft.editor.selection.SelectionListener,com.jidesoft.search.FindResultIntepreter,ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener
- Enclosing class:
- CodeEditorFactory
public static class CodeEditorFactory.AutoCompileCodeEditor
extends com.jidesoft.editor.CodeEditor
Python code editor capable of compiling its text after keystrokes have stopped for
one second. The first error found is underlined through the end of the line.
Add ScriptCompilerListeners to be notified with the error message when compilation has finished.
Use the .getMarkerArea().getMarkerStripe() component in order to display the error annotation next to the editor.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jidesoft.editor.CodeEditor
com.jidesoft.editor.CodeEditor.DefaultUIResourceHighlighterNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
Fields inherited from class com.jidesoft.editor.CodeEditor
_caretModel, _caretVisible, _clipboards, _defaultSettings, _document, _documentHandler, _editable, _firstLine, _horizontalOffset, _horizontalScrollBar, _inspectionTimer, _lineNumberMargin, _localSettings, _magicCaret, _marginArea, _overwrite, _painter, _scrollBarsInitialized, _searchable, _selectionModel, _settings, _undoableEditListener, _verticalScrollBar, _visibleLines, biasLeft, BOTTOM, bracketLine, bracketPosition, caretTimer, CENTER, focusedComponent, LEFT, LEFT_OF_SCROLLBAR, lineSegment, PROPERTY_COLUMN_SELECTION_ENABLED, PROPERTY_EDITABLE, PROPERTY_FIRST_LINE, PROPERTY_LINE_BREAK_STYLE, PROPERTY_MAX_NUMBER_OF_CLIPBOARDS, PROPERTY_OVERWRITE_ENABLED, PROPERTY_REPLACE_TAB_WITH_SPACE, PROPERTY_TAB_SIZE, PROPERTY_VISIBLE_LINES, RIGHT, SMART_HOME_END_PROPERTYFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface com.jidesoft.editor.LineBreak
CR, LF, LINE_BREAK_CODE_EDITOR, LINE_BREAK_MAC, LINE_BREAK_MIXED, LINE_BREAK_PC, LINE_BREAK_UNIX, LINE_BREAK_UNKNOWN, STRING_CR, STRING_CR_LF, STRING_LF -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompilerListener(ScriptCompilerListener listener) voiddispose()getText()voidremoveCompilerListener(ScriptCompilerListener listener) voidsetAutoCompile(boolean autoCompile) Methods inherited from class com.jidesoft.editor.CodeEditor
_offsetToX, _offsetToX, addCodeInspector, addColumnGuide, addNotify, adjustColumnSelectionModelOnCaretMoving, append, b, backspaceChar, backspaceWord, blinkCaret, blockComments, caretUpdated, clearClipboards, clipboardCopy, clipboardCut, clipboardMove, clipboardPaste, collapseAll, collapseFolding, columnToX, columnToX, commentLine, commentLine, configureStyledLabel, createClipboardOwner, createCodeEditorPainter, createDefaultTransferHandler, createHighlighter, createLazyLoadDocument, createOutputStreamWriter, createOverlay, createReplaceAllDocumentEvent, createScrollBar, createSearchable, createSelectionModel, customizeDialog, customizeDialogData, deleteChar, deleteLine, deleteWord, discardAllEdits, documentChanged, duplicateSelection, escape, expandAll, expandFolding, exportText, exportToOutputStream, find, findNext, findPrevious, getAnchorSelectionOffset, getBracketHighlightColor, getBracketLine, getBracketPosition, getCaretColor, getCaretLocation, getCaretLocationOnScreen, getCaretModel, getCaretPosition, getCodeInspector, getCodeInspectorCount, getCodeInspectors, getColumnGuides, getContentSize, getCorrespondingColumn, getCurrentIndentForLine, getCurrentWord, getCurrentWord, getCurrentWordBounds, getCurrentWordBounds, getDefaultLineBreakStyle, getDocument, getDocumentLength, getDragEnabled, getElectricScroll, getFileName, getFindAndReplace, getFirstLine, getFixedHighlighter, getFocusCycleRoot, getFocusTraversalKeysEnabled, getFoldingModel, getHighlighter, getHorizontalOffset, getHorizontalScrollBar, getHorizontalScrollBarPolicy, getInputHandler, getInputMethodRequests, getIntegerOffsetToX, getLeadSelectionOffset, getLeftWordPart, getLeftWordPart, getLineBreakStyle, getLineCount, getLineEndOffset, getLineHeight, getLineHighlightColor, getLineLength, getLineNumber, getLineNumberMargin, getLineStartOffset, getLineStartOffsetNoSpace, getLineText, getLineText, getMagicCaretPosition, getMarginArea, getMarkerArea, getMarkerModel, getMarkPosition, getMaxNumberOfClipboards, getPainter, getRawText, getResourceString, getSearchable, getSelectedText, getSelectionColor, getSelectionEnd, getSelectionEnd, getSelectionEndLine, getSelectionModel, getSelectionStart, getSelectionStart, getSelectionStartLine, getSpecialCharactersColor, getStyles, getTabSize, getText, getText, getTokenMarker, getTransferHandler, getVerticalScrollBar, getVerticalScrollBarPolicy, getVisibleLines, getVisualLineCount, gotoEndOfLine, gotoLine, gotoLineAtView, gotoOffset, importText, indentLine, indentLine, indentLinesBetween, indentSelectedLines, indentSelection, initializeDefaultSettings, insertBreak, insertChar, inspectCode, inspectCode, internalGetColumnGuides, isAdjustColumnSelectionOnMouseEvent, isAutoIndent, isAutoInspecting, isBlink, isBlockCaret, isBracketHighlightVisible, isCaretBlinks, isCaretVisible, isChangePromptDialogPosition, isColumnSelectionMode, isContentVisible, isCopyVisibleTextOnly, isDelayContentsOnLoading, isEditable, isIndentOnPasting, isLineBreakStyleMixed, isLineHighlightVisible, isLineNumberVisible, isManagingFocus, isOverwriteEnabled, isPaintInvalid, isReplaceTabWithSpace, isSelectionRectangular, isShowToolTipOverMarkedText, isSkipsEmptyLinesOnLineComments, isSpecialCharactersVisible, isTabAlignment, isVirtualSpaceAllowed, joinLines, lineComments, lineToY, loadActionMap, modelPositionToOffset, modelToView, modelToView, modelToViewLine, modelToViewPosition, moveToDocumentEnd, moveToDocumentStart, moveToLineEnd, moveToLineStart, moveToNextChar, moveToNextLine, moveToNextPage, moveToNextWord, moveToNextWord, moveToPreviousChar, moveToPreviousLine, moveToPreviousPage, moveToPreviousWord, moveToPreviousWord, offsetToLine, offsetToModelPosition, offsetToViewPosition, offsetToX, offsetToX, overwriteSetSelectedText, pageLoadFailedHandling, pasteWithDialog, pauseBlink, processKeyEvent, promptGotoLine, promptGotoLineAtView, promptGotoOffset, propertyChange, quickSearch, recalculateContentSize, recalculateVisibleLines, redo, removeAllColumnGuides, removeCodeInspector, removeColumnGuide, removeNotify, repaint, repaint, repaint, replace, resetContentSize, s, scrollDownPage, scrollTo, scrollToCaret, scrollToViewPosition, scrollToViewPosition, scrollUpPage, select, select, select, selectAll, selectBlock, selectionChanged, selectLine, selectLines, selectNone, selectToMatchingBracket, selectWord, selectWord, setAdjustColumnSelectionOnMouseEvent, setAutoIndent, setAutoInspecting, setBlink, setBlockCaret, setBracketHighlightColor, setBracketHighlightVisible, setCaretBlinks, setCaretColor, setCaretPosition, setCaretVisible, setChangePromptDialogPosition, setContentVisible, setCopyVisibleTextOnly, setDelayContentsOnLoading, setDocument, setDragEnabled, setEditable, setElectricScroll, setFileName, setFileName, setFirstLine, setFixedHighlighter, setFoldingModel, setFont, setHighlighter, setHorizontalOffset, setHorizontalScrollBarPolicy, setIndentOnPasting, setInputHandler, setLineBreakStyle, setLineHighlight, setLineHighlightColor, setLineNumberVisible, setLineText, setMagicCaretPosition, setMarginArea, setMarkerArea, setMarkerModel, setMaxNumberOfClipboards, setOrigin, setOverlayVisible, setOverwriteEnabled, setPaintInvalid, setRawText, setReplaceTabWithSpace, setSelectedText, setSelectionColor, setSelectionEnd, setSelectionRectangular, setSelectionStart, setShowToolTipOverMarkedText, setSkipsEmptyLinesOnLineComments, setSpecialCharactersColor, setSpecialCharactersVisible, setStyles, setTabAlignment, setTabSize, setText, setTokenMarker, setVerticalScrollBarPolicy, setVirtualSpaceAllowed, showMessage, splitLine, startNewLine, stopInspectCode, surroundSelection, swap, toggleCase, toggleFoldingSelection, toggleOverwrite, undo, unindentSelection, updateBracketHighlight, updateScrollBars, viewToModelLine, viewToModelPosition, xToColumn, xToColumn, xToOffset, xyToOffset, yToLineMethods inherited from class javax.swing.JComponent
addAncestorListener, 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, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUIMethods 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, validateTreeMethods 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, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, 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, 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
-
Constructor Details
-
AutoCompileCodeEditor
public AutoCompileCodeEditor(com.jidesoft.editor.DefaultSettings settings)
-
-
Method Details
-
getText
- Overrides:
getTextin classcom.jidesoft.editor.CodeEditor
-
dispose
public void dispose()- Overrides:
disposein classcom.jidesoft.editor.CodeEditor
-
addCompilerListener
-
removeCompilerListener
-
setAutoCompile
public void setAutoCompile(boolean autoCompile)
-