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 (forISourceFile
work).- See Also:
IOutlinePopupHost
,OutlinePopup
-
-
Constructor Summary
Constructors Constructor Description TextViewerOutlinePopupTarget(org.eclipse.jface.text.ITextViewer viewer, org.eclipse.core.resources.IFile file)
Constructor forTextViewerOutlinePopupTarget
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.widgets.Control
getControl()
org.eclipse.ui.IEditorInput
getEditorInput()
ISelectionProvider
getSelectionProvider()
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 Detail
-
TextViewerOutlinePopupTarget
public TextViewerOutlinePopupTarget(org.eclipse.jface.text.ITextViewer viewer, org.eclipse.core.resources.IFile file)
Constructor forTextViewerOutlinePopupTarget
.- Parameters:
viewer
- target viewerfile
- uderlying file
-
-
Method Detail
-
getControl
public org.eclipse.swt.widgets.Control getControl()
- Specified by:
getControl
in interfaceorg.eclipse.handly.ui.quickoutline.IOutlinePopupHost
-
getSelectionProvider
public ISelectionProvider 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
-
-