Class CustomXtextSourceViewer

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable, org.eclipse.jface.text.IEditingSupportRegistry, org.eclipse.jface.text.ITextOperationTarget, org.eclipse.jface.text.ITextOperationTargetExtension, org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.ITextViewerExtension, org.eclipse.jface.text.ITextViewerExtension2, org.eclipse.jface.text.ITextViewerExtension3, org.eclipse.jface.text.ITextViewerExtension4, org.eclipse.jface.text.ITextViewerExtension5, org.eclipse.jface.text.ITextViewerExtension6, org.eclipse.jface.text.ITextViewerExtension7, org.eclipse.jface.text.ITextViewerExtension8, org.eclipse.jface.text.IWidgetTokenOwner, org.eclipse.jface.text.IWidgetTokenOwnerExtension, org.eclipse.jface.text.source.ISourceViewer, org.eclipse.jface.text.source.ISourceViewerExtension, org.eclipse.jface.text.source.ISourceViewerExtension2, org.eclipse.jface.text.source.ISourceViewerExtension3, org.eclipse.jface.text.source.ISourceViewerExtension4, org.eclipse.jface.text.source.ISourceViewerExtension5, IInputProvider, IInputSelectionProvider, IPostSelectionProvider, ISelectionProvider
    Direct Known Subclasses:
    BslCustomXtextSourceViewer

    public class CustomXtextSourceViewer
    extends org.eclipse.xtext.ui.editor.XtextSourceViewer
    Custom extension of XtextSourceViewer, that provides necessary font to viewer.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CustomXtextSourceViewer.CustomFactory
      Custom implementation of XtextSourceViewer.Factory, that creates CustomXtextSourceViewer.
      • Nested classes/interfaces inherited from class org.eclipse.xtext.ui.editor.XtextSourceViewer

        org.eclipse.xtext.ui.editor.XtextSourceViewer.DefaultFactory, org.eclipse.xtext.ui.editor.XtextSourceViewer.Factory
      • Nested classes/interfaces inherited from class org.eclipse.jface.text.source.SourceViewer

        org.eclipse.jface.text.source.SourceViewer.RulerLayout
      • Nested classes/interfaces inherited from class org.eclipse.jface.text.TextViewer

        org.eclipse.jface.text.TextViewer.TextHoverKey, org.eclipse.jface.text.TextViewer.WidgetCommand
      • Nested classes/interfaces inherited from interface org.eclipse.jface.text.ITextViewerExtension8

        org.eclipse.jface.text.ITextViewerExtension8.EnrichMode
    • Field Summary

      • Fields inherited from class org.eclipse.jface.text.source.projection.ProjectionViewer

        COLLAPSE, COLLAPSE_ALL, EXPAND, EXPAND_ALL, TOGGLE
      • Fields inherited from class org.eclipse.jface.text.source.SourceViewer

        _SELECTION_POSITION_CATEGORY, fAnnotationHover, fContentAssistant, fContentAssistantInstalled, fContentFormatter, fInformationPresenter, fOverviewRulerAnnotationHover, fPresentationReconciler, fQuickAssistAssistant, fQuickAssistAssistantInstalled, fReconciler, fSelectionCategory, fSelections, fSelectionUpdater, GAP_SIZE, GAP_SIZE_1, MODEL_ANNOTATION_MODEL
      • Fields inherited from class org.eclipse.jface.text.TextViewer

        fAutoIndentStrategies, fDefaultPrefixChars, fDoubleClickStrategies, fEventConsumer, fFindReplaceDocumentAdapter, fHoverControlCreator, fHyperlinkDetectors, fHyperlinkManager, fHyperlinkPresenter, fHyperlinkStateMask, fIgnoreAutoIndent, fIndentChars, fInformationMapping, fLastTopPixel, fMarkPosition, fPaintManager, fPartitioning, fReplaceTextPresentation, fTextHovers, fTextInputListeners, fTextListeners, fTextPresentationListeners, fUndoManager, fViewportListeners, INTERNAL, KEY, MOUSE, MOUSE_END, RESIZE, SCROLLER, SHIFTING, TRACE_ERRORS
      • Fields inherited from interface org.eclipse.jface.text.source.ISourceViewer

        CONTENTASSIST_CONTEXT_INFORMATION, CONTENTASSIST_PROPOSALS, FORMAT, INFORMATION, QUICK_ASSIST
      • Fields inherited from interface org.eclipse.jface.text.ITextOperationTarget

        COPY, CUT, DELETE, PASTE, PREFIX, PRINT, REDO, SELECT_ALL, SHIFT_LEFT, SHIFT_RIGHT, STRIP_PREFIX, UNDO
      • Fields inherited from interface org.eclipse.jface.text.ITextViewerExtension2

        DEFAULT_HOVER_STATE_MASK
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomXtextSourceViewer​(org.eclipse.swt.widgets.Composite parent, org.eclipse.jface.text.source.IVerticalRuler ruler, org.eclipse.jface.text.source.IOverviewRuler overviewRuler, boolean showsAnnotationOverview, int styles)
      Constructor for CustomXtextSourceViewer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void createControl​(org.eclipse.swt.widgets.Composite parent, int styles)
      protected com._1c.g5.v8.dt.lcore.ui.editor.CustomXtextSourceViewer.AltSymbolsVerifyKeyListener getAltSymbolVerifyKeyListener()
      Gets special VerifyKeyListener which change input symbol if "alt" is pressed
      protected com._1c.g5.v8.dt.lcore.ui.editor.CustomXtextSourceViewer.CopyVerifyKeyListener getCopyLineVerifyKeyListener()
      Gets special VerifyKeyListener in case when copy command was called for empty selection - all text at current line will be copied
      boolean isEditable()  
      • Methods inherited from class org.eclipse.xtext.ui.editor.XtextSourceViewer

        getAdapter, getContentAssistant, prependTextPresentationListener, updateTextListeners
      • Methods inherited from class org.eclipse.jface.text.source.projection.ProjectionViewer

        addProjectionListener, canDoOperation, computeCollapsedRegion, computeCollapsedRegionAnchor, copyMarkedRegion, createSlaveDocumentManager, createVisualAnnotationModel, disableProjection, doOperation, enableProjection, exposeModelRange, findAndSelect, findAndSelectInRange, fireProjectionDisabled, fireProjectionEnabled, getCoveredModelRanges, getFindReplaceDocumentAdapter, getProjectionAnnotationModel, getVisibleRegion, handleDispose, handleVerifyEvent, handleVisibleDocumentAboutToBeChanged, handleVisibleDocumentChanged, isProjectionMode, overlapsWithVisibleRegion, postCatchupRequest, processCatchupRequest, reinitializeProjection, removeProjectionListener, resetVisibleRegion, setDocument, setProjectionSummary, setRangeIndication, setVisibleDocument, setVisibleRegion, updateSlaveDocument, widgetSelection2ModelSelection
      • Methods inherited from class org.eclipse.jface.text.source.SourceViewer

        activatePlugins, addVerticalRulerColumn, clearRememberedSelection, configure, createFormattingContext, createFormattingContext, createLayout, disposeVisualAnnotationModel, enableOperation, ensureAnnotationHoverManagerInstalled, ensureOverviewHoverManagerInstalled, getAnnotationModel, getContentAssistantFacade, getControl, getCurrentAnnotationHover, getQuickAssistAssistant, getQuickAssistInvocationContext, getRangeIndication, getVerticalRuler, getVisualAnnotationModel, hasCodeMiningProviders, rememberSelection, removeRangeIndication, removeVerticalRulerColumn, restoreSelection, setAnnotationHover, setCodeMiningAnnotationPainter, setCodeMiningProviders, setDocument, setDocument, setDocument, setHoverEnrichMode, setOverviewRulerAnnotationHover, setRangeIndicator, showAnnotations, showAnnotationsOverview, unconfigure, updateCodeMinings, updateSlaveDocuments
      • Methods inherited from class org.eclipse.jface.text.TextViewer

        _getVisibleRegionOffset, _internalGetVisibleRegion, addPainter, addPostSelectionChangedListener, addTextInputListener, addTextListener, addTextPresentationListener, addViewportListener, appendVerifyKeyListener, areMultipleLinesSelected, canPerformFind, changeTextPresentation, createDocumentAdapter, createSlaveDocument, createTextWidget, customizeDocumentCommand, deleteText, disableRedrawing, enabledRedrawing, enabledRedrawing, event2ModelRange, findAndSelect, fireInputDocumentAboutToBeChanged, fireInputDocumentChanged, firePostSelectionChanged, fireSelectionChanged, freeSlaveDocument, getAverageCharWidth, getBottomIndex, getBottomIndexEndOffset, getClosestWidgetLineForModelLine, getCurrentTextHover, getDocument, getDocumentPartitioning, getEmptySelectionChangedEventDelay, getExtent, getFindReplaceTarget, getHoverEventLocation, getInput, getMark, getModelCoverage, getPaintManager, getRegisteredSupports, getRewriteTarget, getSelectedRange, getSelection, getSelectionProvider, getSlaveDocumentManager, getTextHover, getTextHover, getTextHoveringController, getTextOperationTarget, getTextWidget, getTopIndex, getTopIndexStartOffset, getTopInset, getUndoManager, getVisibleDocument, getVisibleLinesInViewport, getWidthInPixels, getWidthInPixels, ignoreAutoEditStrategies, initializeDocumentInformationMapping, inputChanged, internalRevealRange, invalidateTextPresentation, invalidateTextPresentation, isBlockSelected, isIgnoringAutoEditStrategies, isPrintable, markChanged, modelLine2WidgetLine, modelOffset2WidgetOffset, modelRange2ClosestWidgetRange, modelRange2WidgetRange, modelRange2WidgetRange, modelSelection2WidgetSelection, modelStyleRange2WidgetStyleRange, moveFocusToWidgetToken, prependAutoEditStrategy, prependVerifyKeyListener, print, print, redraws, refresh, register, releaseWidgetToken, removeAutoEditStrategy, removePainter, removePostSelectionChangedListener, removeTextHovers, removeTextInputListener, removeTextListener, removeTextPresentationListener, removeVerifyKeyListener, removeViewportListener, requestWidgetToken, requestWidgetToken, resetPlugins, revealRange, selectContentTypePlugin, selectionChanged, setAutoEditStrategies, setAutoIndentStrategy, setDefaultPrefixes, setDocumentPartitioning, setEditable, setEventConsumer, setHoverControlCreator, setHyperlinkDetectors, setHyperlinkPresenter, setIndentPrefixes, setInput, setMark, setRedraw, setRedraw, setSelectedRange, setSelection, setTabsToSpacesConverter, setTextColor, setTextColor, setTextDoubleClickStrategy, setTextHover, setTextHover, setTopIndex, setUndoManager, shift, shift, startSequentialRewriteMode, stopSequentialRewriteMode, unregister, updateViewportListeners, updateVisibleDocument, validateSelectionRange, widgetLine2ModelLine, widgetLineOfWidgetOffset, widgetlLine2ModelLine, widgetOffset2ModelOffset, widgetRange2ModelRange
      • Methods inherited from interface org.eclipse.jface.text.ITextViewer

        addTextInputListener, addTextListener, addViewportListener, changeTextPresentation, getBottomIndex, getBottomIndexEndOffset, getDocument, getFindReplaceTarget, getSelectedRange, getSelectionProvider, getTextOperationTarget, getTextWidget, getTopIndex, getTopIndexStartOffset, getTopInset, invalidateTextPresentation, removeTextInputListener, removeTextListener, removeViewportListener, resetPlugins, revealRange, setAutoIndentStrategy, setDefaultPrefixes, setEditable, setEventConsumer, setIndentPrefixes, setSelectedRange, setTextColor, setTextColor, setTextDoubleClickStrategy, setTextHover, setTopIndex, setUndoManager
      • Methods inherited from interface org.eclipse.jface.text.ITextViewerExtension3

        widgetlLine2ModelLine
      • Methods inherited from interface org.eclipse.jface.text.ITextViewerExtension5

        getModelCoverage, modelLine2WidgetLine, modelOffset2WidgetOffset, modelRange2WidgetRange, widgetLine2ModelLine, widgetLineOfWidgetOffset, widgetOffset2ModelOffset, widgetRange2ModelRange
    • Constructor Detail

      • CustomXtextSourceViewer

        public CustomXtextSourceViewer​(org.eclipse.swt.widgets.Composite parent,
                                       org.eclipse.jface.text.source.IVerticalRuler ruler,
                                       org.eclipse.jface.text.source.IOverviewRuler overviewRuler,
                                       boolean showsAnnotationOverview,
                                       int styles)
        Constructor for CustomXtextSourceViewer.
        Parameters:
        parent - the SWT parent control, can't be null
        ruler - the vertical ruler, can be null
        overviewRuler - the overview ruler, can be null
        showsAnnotationOverview - true if the overview ruler should be shown
        styles - the SWT style bits
    • Method Detail

      • isEditable

        public boolean isEditable()
        Specified by:
        isEditable in interface org.eclipse.jface.text.ITextViewer
        Overrides:
        isEditable in class org.eclipse.jface.text.TextViewer
      • createControl

        protected void createControl​(org.eclipse.swt.widgets.Composite parent,
                                     int styles)
        Overrides:
        createControl in class org.eclipse.jface.text.source.SourceViewer
      • getAltSymbolVerifyKeyListener

        protected com._1c.g5.v8.dt.lcore.ui.editor.CustomXtextSourceViewer.AltSymbolsVerifyKeyListener getAltSymbolVerifyKeyListener()
        Gets special VerifyKeyListener which change input symbol if "alt" is pressed
        Returns:
        special VerifyKeyListener which change input symbol if "alt" is pressed, never null
      • getCopyLineVerifyKeyListener

        protected com._1c.g5.v8.dt.lcore.ui.editor.CustomXtextSourceViewer.CopyVerifyKeyListener getCopyLineVerifyKeyListener()
        Gets special VerifyKeyListener in case when copy command was called for empty selection - all text at current line will be copied
        Returns:
        special VerifyKeyListener in case when copy command was called for empty selection - all text at current line will be copied, never null