![]() Notice this shading indicates the range of the method currently beingĮdited. To use the Java editor as an example again, you’ ll In the vertical ruler bar that shades the portion of the editor corresponding The source viewer in turn creates an annotation The default implementation of ITextEditorĪlso links the highlight range to the ISourceViewer concept of Used in the Java editor to support the “ Show source of selectedĮlement only” mode. Its most useful feature is that theĮditor can be toggled to show only the current highlight range. Highlight range also defines a subset of the editor contents, but it cannotīe directly manipulated by the user. That will change the selection and also scroll the editor so that the new ITextEditor provides a convenience method, selectAndReveal, ![]() The selection can also be changed using the selection provider, but ITextSelection text = (ITextSelection)selection ISelection selection = sp.getSelection() ISelectionProvider sp = editor.getSelectionProvider() The selection can be obtained programmatically via the editor’ s The selection is the highlighted segment of text typically set by the user whenĭragging the mouse or moving the caret around while holding the ITextEditor has two similar concepts for singling outĪ portion of the editor contents: selection and highlight range.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |