Package org.eclipse.search.ui
Interface ISearchPageContainer
public interface ISearchPageContainer
Offers client access to the search dialog.
A search page can enable or disable the dialog's action
button and get an operation context to perform the action.
The dialog itself cannot be accessed directly.
This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
- Restriction:
- This interface is not intended to be extended by clients.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCurrent Project scope (value4).static final intCurrent Project scope (value3).static final intSelection scope (value1).static final intWorking set scope (value2).static final intWorkspace scope (value0). -
Method Summary
Modifier and TypeMethodDescriptionReturns the editor input of the active editor.Returns the context for the search operation.String[]Returns the names of the enclosing projects if selected by the container ornullif the scope is notSELECTED_PROJECTS_SCOPEintReturns search container's selected scope.Returns the selected working sets of this container.Returns the selection with which this container was opened.booleanTells whether a valid scope is selected.voidsetActiveEditorCanProvideScopeSelection(boolean state) Tells this container whether the active editor can provide the selection for the scope and hence theSELECTION_SCOPEcan be enabled if the active part is an editor.voidsetPerformActionEnabled(boolean state) Sets the enable state of the perform action button of this container.voidsetSelectedScope(int scope) Sets the selected scope of this search page container.voidsetSelectedWorkingSets(IWorkingSet[] workingSets) Sets the selected working sets of this container.
-
Field Details
-
WORKSPACE_SCOPE
static final int WORKSPACE_SCOPEWorkspace scope (value0).- Since:
- 2.0
- See Also:
-
SELECTION_SCOPE
static final int SELECTION_SCOPESelection scope (value1).- Since:
- 2.0
- See Also:
-
WORKING_SET_SCOPE
static final int WORKING_SET_SCOPEWorking set scope (value2).- Since:
- 2.0
- See Also:
-
SELECTED_PROJECTS_SCOPE
static final int SELECTED_PROJECTS_SCOPECurrent Project scope (value3).- Since:
- 3.0
- See Also:
-
OPENED_EDITORS_SCOPE
static final int OPENED_EDITORS_SCOPECurrent Project scope (value4).- Since:
- 3.16
- See Also:
-
-
Method Details
-
getSelection
ISelection getSelection()Returns the selection with which this container was opened.- Returns:
- the selection passed to this container when it was opened
-
getRunnableContext
IRunnableContext getRunnableContext()Returns the context for the search operation. This context allows progress to be shown inside the search dialog.- Returns:
- the
IRunnableContextfor the search operation
-
setPerformActionEnabled
void setPerformActionEnabled(boolean state) Sets the enable state of the perform action button of this container.- Parameters:
state-trueto enable the button which performs the action
-
getSelectedScope
int getSelectedScope()Returns search container's selected scope. The scope is WORKSPACE_SCOPE, SELECTED_PROJECTS_SCOPE, SELECTION_SCOPE, OPENED_EDITORS_SCOPE or WORKING_SET_SCOPE.- Returns:
- the selected scope
- Since:
- 2.0
-
setSelectedScope
void setSelectedScope(int scope) Sets the selected scope of this search page container. The scope is WORKSPACE_SCOPE, SELECTED_PROJECTS_SCOPE, SELECTION_SCOPE, OPENED_EDITORS_SCOPE or WORKING_SET_SCOPE.- Parameters:
scope- the newly selected scope- Since:
- 2.0
-
hasValidScope
boolean hasValidScope()Tells whether a valid scope is selected.- Returns:
- a
trueif a valid scope is selected in this search page container - Since:
- 2.0
-
setActiveEditorCanProvideScopeSelection
void setActiveEditorCanProvideScopeSelection(boolean state) Tells this container whether the active editor can provide the selection for the scope and hence theSELECTION_SCOPEcan be enabled if the active part is an editor.- Parameters:
state-trueif the active editor can provide the selection,falseotherwise- Since:
- 3.7
-
getActiveEditorInput
IEditorInput getActiveEditorInput()Returns the editor input of the active editor.- Returns:
- the editor input or
nullif the active part is not an editor - Since:
- 3.7
-
getSelectedWorkingSets
IWorkingSet[] getSelectedWorkingSets()Returns the selected working sets of this container.- Returns:
- an array with the selected working sets or
nullif the scope is notWORKING_SET_SCOPE - Since:
- 2.0
-
setSelectedWorkingSets
Sets the selected working sets of this container.- Parameters:
workingSets- an array of IWorkingSet- Since:
- 2.0
-
getSelectedProjectNames
String[] getSelectedProjectNames()Returns the names of the enclosing projects if selected by the container ornullif the scope is notSELECTED_PROJECTS_SCOPE- Returns:
- the names of the enclosing project or
nullif the scope is notSELECTED_PROJECTS_SCOPE. - Since:
- 3.2
-