Class Segment
- java.lang.Object
-
- org.eclipse.jface.text.Position
-
- org.eclipse.jface.text.projection.Segment
-
public class Segment extends Position
Internal class. Do not use. Only public for testing purposes.A segment is the image of a master document fragment in a projection document.
- Since:
- 3.0
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
-
Field Summary
Fields Modifier and Type Field Description Fragment
fragment
The corresponding fragment for this segment.boolean
isMarkedForShift
A flag indicating that the segment updater should shift this segment when a change happens at its boundaries.boolean
isMarkedForStretch
A flag indicating that the segment updater should stretch this segment when a change happens at its boundaries.
-
Constructor Summary
Constructors Constructor Description Segment(int offset, int length)
Creates a new segment covering the given range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearMark()
Clears the shifting and the stretching flag.boolean
isMarkedForShift()
Returnstrue
if the shifting flag is set,false
otherwise.boolean
isMarkedForStretch()
Returnstrue
if the stretching flag is set,false
otherwise.void
markForShift()
Sets the shifting flag.void
markForStretch()
Sets the stretching flag.
-
-
-
Field Detail
-
fragment
public Fragment fragment
The corresponding fragment for this segment.
-
isMarkedForStretch
public boolean isMarkedForStretch
A flag indicating that the segment updater should stretch this segment when a change happens at its boundaries.
-
isMarkedForShift
public boolean isMarkedForShift
A flag indicating that the segment updater should shift this segment when a change happens at its boundaries.
-
-
Method Detail
-
markForStretch
public void markForStretch()
Sets the stretching flag.
-
isMarkedForStretch
public boolean isMarkedForStretch()
Returnstrue
if the stretching flag is set,false
otherwise.- Returns:
true
if the stretching flag is set,false
otherwise
-
markForShift
public void markForShift()
Sets the shifting flag.
-
isMarkedForShift
public boolean isMarkedForShift()
Returnstrue
if the shifting flag is set,false
otherwise.- Returns:
true
if the shifting flag is set,false
otherwise
-
clearMark
public void clearMark()
Clears the shifting and the stretching flag.
-
-