Package org.eclipse.jface.text
Interface IFindReplaceTargetExtension
-
public interface IFindReplaceTargetExtensionExtension interface forIFindReplaceTarget.Introduces the concepts of find/replace sessions, searching in a limiting scope and a replace-all mode.
If a scope is set,
findAndSelectis limited to the scope. Occurrences outside of the scope are not considered.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbeginSession()Indicates that a session with the target begins.voidendSession()Indicates that a session with the target ends.PointgetLineSelection()Returns the currently selected range of lines as a offset and length.IRegiongetScope()Returns the find scope of the target,nullfor global scope.voidsetReplaceAllMode(boolean replaceAll)Sets the target's replace-all mode.voidsetScope(IRegion scope)Sets the find scope of the target to operate on.voidsetScopeHighlightColor(Color color)Sets the scope highlight colorvoidsetSelection(int offset, int length)Sets a selection.
-
-
-
Method Detail
-
beginSession
void beginSession()
Indicates that a session with the target begins. All calls exceptbeginSession()andendSession()toIFindReplaceTargetandIFindReplaceTargetExtensionmust be embedded within calls tobeginSession()andendSession().- See Also:
endSession()
-
endSession
void endSession()
Indicates that a session with the target ends.- See Also:
beginSession()
-
getScope
IRegion getScope()
Returns the find scope of the target,nullfor global scope.- Returns:
- returns the find scope of the target, may be
null
-
setScope
void setScope(IRegion scope)
Sets the find scope of the target to operate on.nullindicates that the global scope should be used.- Parameters:
scope- the find scope of the target, may benull
-
getLineSelection
Point getLineSelection()
Returns the currently selected range of lines as a offset and length.- Returns:
- the currently selected line range
-
setSelection
void setSelection(int offset, int length)Sets a selection.- Parameters:
offset- the offset of the selectionlength- the length of the selection
-
setScopeHighlightColor
void setScopeHighlightColor(Color color)
Sets the scope highlight color- Parameters:
color- the color of the scope highlight
-
setReplaceAllMode
void setReplaceAllMode(boolean replaceAll)
Sets the target's replace-all mode.- Parameters:
replaceAll-trueif this target should switch into replace-all mode,falseif it should leave the replace-all state
-
-