public class FindModel extends UserDataHolderBase implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static interface |
FindModel.FindModelObserver |
static class |
FindModel.SearchContext |
Constructor and Description |
---|
FindModel() |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(FindModel.FindModelObserver observer) |
FindModel |
clone() |
java.util.regex.Pattern |
compileRegExp() |
void |
copyFrom(FindModel model)
Copies all the settings from the specified model.
|
boolean |
equals(java.lang.Object o) |
SearchScope |
getCustomScope() |
java.lang.String |
getCustomScopeName() |
java.lang.String |
getDirectoryName()
Gets the directory used as a scope for Find in Path / Replace in Path.
|
java.lang.String |
getFileFilter()
Gets the file name filter used for Find in Path / Replace in Path operation.
|
java.lang.String |
getModuleName()
Gets the name of the module used as the scope for the Find in Path / Replace
in Path operation.
|
FindModel.SearchContext |
getSearchContext() |
java.lang.String |
getStringToFind()
Gets the string to find.
|
java.lang.String |
getStringToReplace()
Gets the string to replace with.
|
int |
hashCode() |
static void |
initStringToFind(FindModel findModel,
java.lang.String s) |
static void |
initStringToFindNoMultiline(FindModel findModel,
java.lang.String s)
Deprecated.
|
boolean |
isCaseSensitive()
Gets the Case Sensitive flag.
|
boolean |
isCustomScope() |
boolean |
isExceptComments() |
boolean |
isExceptCommentsAndStringLiterals() |
boolean |
isExceptStringLiterals() |
boolean |
isFindAll()
Gets the flag indicating whether "Find All" button was used to initiate the find
operation.
|
boolean |
isFindAllEnabled()
Gets the flag indicating whether "Find All" button is allowed for the operation.
|
boolean |
isForward()
Gets the direction for the find.
|
boolean |
isFromCursor()
Gets the origin for the find.
|
boolean |
isGlobal()
Gets the scope of the operation.
|
boolean |
isInCommentsOnly() |
boolean |
isInStringLiteralsOnly() |
boolean |
isMultiline() |
boolean |
isMultipleFiles()
Checks if the find or replace operation affects multiple files.
|
boolean |
isOpenInNewTab()
Deprecated.
and not used anymore
|
boolean |
isOpenInNewTabEnabled()
Deprecated.
and not used anymore
|
boolean |
isOpenInNewTabVisible()
Deprecated.
and not used anymore
|
boolean |
isPreserveCase()
Gets the Preserve Case flag.
|
boolean |
isProjectScope()
Gets the flag indicating whether the Whole Project scope is selected for Find in Path /
Replace in Path.
|
boolean |
isPromptOnReplace()
Gets the Prompt on Replace flag.
|
boolean |
isRegularExpressions()
Gets the Regular Expressions flag.
|
boolean |
isReplaceAll()
Gets the Replace All flag.
|
boolean |
isReplaceState()
Gets the value indicating whether the operation is a Find or a Replace.
|
boolean |
isSearchInProjectFiles() |
boolean |
isWholeWordsOnly()
Gets the Whole Words Only flag.
|
boolean |
isWithSubdirectories()
Gets the Recursive Search flag for Find in Path / Replace in Path.
|
void |
removeObserver(FindModel.FindModelObserver observer) |
boolean |
searchHighlighters()
Gets the flag indicating whether the search operation is Find Next / Find Previous
after Highlight Usages in Files.
|
void |
setCaseSensitive(boolean val)
Sets the Case Sensitive flag.
|
void |
setCustomScope(boolean customScope) |
void |
setCustomScope(SearchScope customScope) |
void |
setCustomScopeName(java.lang.String customScopeName) |
void |
setDirectoryName(java.lang.String directoryName)
Sets the directory used as a scope for Find in Path / Replace in Path.
|
void |
setFileFilter(java.lang.String fileFilter)
Sets the file name filter used for Find in Path / Replace in Path operation.
|
void |
setFindAll(boolean findAll)
Sets the flag indicating whether "Find All" button was used to initiate the find
operation.
|
void |
setFindAllEnabled(boolean findAllEnabled)
Sets the flag indicating whether "Find All" button is allowed for the operation.
|
void |
setForward(boolean val)
Sets the direction for the find.
|
void |
setFromCursor(boolean val)
Sets the origin for the find.
|
void |
setGlobal(boolean isGlobal)
Sets the scope of the operation.
|
void |
setInCommentsOnly(boolean inCommentsOnly)
Deprecated.
|
void |
setInStringLiteralsOnly(boolean inStringLiteralsOnly)
Deprecated.
|
void |
setModuleName(java.lang.String moduleName)
Sets the name of the module used as the scope for the Find in Path / Replace
in Path operation.
|
void |
setMultiline(boolean multiline) |
void |
setMultipleFiles(boolean val)
Sets the value indicating whether the find or replace operation affects multiple files.
|
void |
setOpenInNewTab(boolean showInNewTab)
Deprecated.
and not used anymore
|
void |
setOpenInNewTabEnabled(boolean showInNewTabEnabled)
Deprecated.
and not used anymore
|
void |
setOpenInNewTabVisible(boolean showInNewTabVisible)
Deprecated.
and not used anymore
|
void |
setPreserveCase(boolean preserveCase)
Sets the Preserve Case flag.
|
void |
setProjectScope(boolean projectScope)
Sets the flag indicating whether the Whole Project scope is selected for Find in Path /
Replace in Path.
|
void |
setPromptOnReplace(boolean val)
Sets the Prompt on Replace flag.
|
void |
setRegularExpressions(boolean val)
Sets the Regular Expressions flag.
|
void |
setReplaceAll(boolean replaceAll)
Sets the Replace All flag.
|
void |
setReplaceState(boolean val)
Sets the value indicating whether the operation is a Find or a Replace.
|
void |
setSearchContext(FindModel.SearchContext _searchContext) |
void |
setSearchHighlighters(boolean search)
Sets the flag indicating whether the search operation is Find Next / Find Previous
after Highlight Usages in Files.
|
void |
setSearchInProjectFiles(boolean searchInProjectFiles) |
void |
setStringToFind(java.lang.String s)
Sets the string to find.
|
void |
setStringToReplace(java.lang.String s)
Sets the string to replace with.
|
void |
setWholeWordsOnly(boolean isWholeWordsOnly)
Sets the Whole Words Only flag.
|
void |
setWithSubdirectories(boolean withSubdirectories)
Sets the Recursive Search flag for Find in Path / Replace in Path.
|
java.lang.String |
toString() |
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
@Deprecated public static void initStringToFindNoMultiline(FindModel findModel, java.lang.String s)
public static void initStringToFind(FindModel findModel, java.lang.String s)
public void addObserver(FindModel.FindModelObserver observer)
public void removeObserver(FindModel.FindModelObserver observer)
public boolean isMultiline()
public void setMultiline(boolean multiline)
public boolean isPreserveCase()
public void setPreserveCase(boolean preserveCase)
preserveCase
- the value of the Preserve Case flag.public void copyFrom(FindModel model)
model
- the model to copy settings from.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getStringToFind()
public void setStringToFind(java.lang.String s)
s
- the string to find.public java.lang.String getStringToReplace()
public void setStringToReplace(java.lang.String s)
s
- the string to replace with.public boolean isReplaceState()
public void setReplaceState(boolean val)
val
- true if the operation is a Replace, false if it is a Find.public boolean isFromCursor()
public void setFromCursor(boolean val)
val
- true if the origin is From Cursor, false if it is Entire Scope.public boolean isForward()
public void setForward(boolean val)
val
- true if the find is forward, false if it is backward.public boolean isRegularExpressions()
public void setRegularExpressions(boolean val)
val
- the value of the Regular Expressions flag.public boolean isCaseSensitive()
public void setCaseSensitive(boolean val)
val
- the value of the Case Sensitive flag.public boolean isMultipleFiles()
public void setMultipleFiles(boolean val)
val
- true if the operation affects multiple files, false if it affects a single file.public boolean isPromptOnReplace()
public void setPromptOnReplace(boolean val)
val
- the value of the Prompt on Replace flag.public boolean isWholeWordsOnly()
public void setWholeWordsOnly(boolean isWholeWordsOnly)
isWholeWordsOnly
- the value of the Whole Words Only flag.public boolean isGlobal()
public void setGlobal(boolean isGlobal)
isGlobal
- true if the operation affects the entire file, false if it affects the selected text.public boolean isReplaceAll()
public void setReplaceAll(boolean replaceAll)
replaceAll
- the value of the Replace All flag.@Deprecated public boolean isOpenInNewTab()
@Deprecated public void setOpenInNewTab(boolean showInNewTab)
showInNewTab
- the value of the Open in New Tab flag.@Deprecated public boolean isOpenInNewTabEnabled()
@Deprecated public void setOpenInNewTabEnabled(boolean showInNewTabEnabled)
showInNewTabEnabled
- true if Open in New Tab is enabled, false otherwise.@Deprecated public boolean isOpenInNewTabVisible()
@Deprecated public void setOpenInNewTabVisible(boolean showInNewTabVisible)
public java.lang.String getDirectoryName()
public void setDirectoryName(java.lang.String directoryName)
directoryName
- the directory scope.public boolean isWithSubdirectories()
public void setWithSubdirectories(boolean withSubdirectories)
withSubdirectories
- true if directories are searched recursively, false otherwise.public boolean isProjectScope()
public void setProjectScope(boolean projectScope)
projectScope
- true if the whole project scope is selected, false otherwise.public FindModel clone()
clone
in class UserDataHolderBase
public java.lang.String toString()
toString
in class java.lang.Object
public boolean searchHighlighters()
public void setSearchHighlighters(boolean search)
search
- true if the operation moves between highlighted regions, false otherwise.public java.lang.String getFileFilter()
public void setFileFilter(java.lang.String fileFilter)
fileFilter
- the file name filter text.public java.lang.String getModuleName()
public void setModuleName(java.lang.String moduleName)
moduleName
- the name of the module used as the scope.public boolean isFindAll()
public void setFindAll(boolean findAll)
findAll
- true if the operation is a "Find All", false otherwise.public boolean isFindAllEnabled()
public void setFindAllEnabled(boolean findAllEnabled)
findAllEnabled
- true if "Find All" is enabled, false otherwise.public java.lang.String getCustomScopeName()
public void setCustomScopeName(java.lang.String customScopeName)
public SearchScope getCustomScope()
public void setCustomScope(SearchScope customScope)
public boolean isCustomScope()
public void setCustomScope(boolean customScope)
public boolean isInStringLiteralsOnly()
public boolean isExceptComments()
public boolean isExceptStringLiterals()
public boolean isInCommentsOnly()
public boolean isExceptCommentsAndStringLiterals()
@Deprecated public void setInCommentsOnly(boolean inCommentsOnly)
@Deprecated public void setInStringLiteralsOnly(boolean inStringLiteralsOnly)
public FindModel.SearchContext getSearchContext()
public void setSearchContext(FindModel.SearchContext _searchContext)
public boolean isSearchInProjectFiles()
public void setSearchInProjectFiles(boolean searchInProjectFiles)
public java.util.regex.Pattern compileRegExp()