Class TextViewerOutlinePopupTarget
java.lang.Object
com._1c.g5.v8.dt.lcore.ui.outline.TextViewerOutlinePopupTarget
- All Implemented Interfaces:
org.eclipse.handly.ui.quickoutline.IOutlinePopupHost
public class TextViewerOutlinePopupTarget
extends Object
implements org.eclipse.handly.ui.quickoutline.IOutlinePopupHost
Outline popup target, based on given text viewer and
underlying file (for
ISourceFile
work).- See Also:
-
IOutlinePopupHost
OutlinePopup
-
Constructor Summary
ConstructorsConstructorDescriptionTextViewerOutlinePopupTarget
(org.eclipse.jface.text.ITextViewer viewer, org.eclipse.core.resources.IFile file) Constructor forTextViewerOutlinePopupTarget
. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.widgets.Control
org.eclipse.ui.IEditorInput
protected boolean
isVisible
(org.eclipse.jface.text.ITextViewer viewer, int offset, int length) Tells whether the given region is visible in the given source viewer.void
selectAndReveal
(int offset, int length) Ensures that the given range is visible.
-
Constructor Details
-
TextViewerOutlinePopupTarget
public TextViewerOutlinePopupTarget(org.eclipse.jface.text.ITextViewer viewer, org.eclipse.core.resources.IFile file) Constructor forTextViewerOutlinePopupTarget
.- Parameters:
viewer
- target viewerfile
- uderlying file
-
-
Method Details
-
getControl
public org.eclipse.swt.widgets.Control getControl()- Specified by:
getControl
in interfaceorg.eclipse.handly.ui.quickoutline.IOutlinePopupHost
-
getSelectionProvider
- Specified by:
getSelectionProvider
in interfaceorg.eclipse.handly.ui.quickoutline.IOutlinePopupHost
-
getEditorInput
public org.eclipse.ui.IEditorInput getEditorInput()- Specified by:
getEditorInput
in interfaceorg.eclipse.handly.ui.quickoutline.IOutlinePopupHost
-
selectAndReveal
public void selectAndReveal(int offset, int length) Ensures that the given range is visible. Sets the selection to the specified range.- Parameters:
offset
- the offset of the selection rangelength
- the length of the selection range. A negative length places the caret at the visual start of the selection.
-
isVisible
protected boolean isVisible(org.eclipse.jface.text.ITextViewer viewer, int offset, int length) Tells whether the given region is visible in the given source viewer.- Parameters:
viewer
- text vieweroffset
- the offset of the selectionlength
- the length of the selection- Returns:
true
if visible
-