Package org.eclipse.search.ui
Interface ISearchPageContainer
-
public interface ISearchPageContainerOffers 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
Fields Modifier and Type Field Description static intSELECTED_PROJECTS_SCOPECurrent Project scope (value3).static intSELECTION_SCOPESelection scope (value1).static intWORKING_SET_SCOPEWorking set scope (value2).static intWORKSPACE_SCOPEWorkspace scope (value0).
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IEditorInputgetActiveEditorInput()Returns the editor input of the active editor.IRunnableContextgetRunnableContext()Returns the context for the search operation.String[]getSelectedProjectNames()Returns the names of the enclosing projects if selected by the container ornullif the scope is notSELECTED_PROJECTS_SCOPEintgetSelectedScope()Returns search container's selected scope.IWorkingSet[]getSelectedWorkingSets()Returns the selected working sets of this container.ISelectiongetSelection()Returns the selection with which this container was opened.booleanhasValidScope()Tells 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 Detail
-
WORKSPACE_SCOPE
static final int WORKSPACE_SCOPE
Workspace scope (value0).- Since:
- 2.0
- See Also:
- Constant Field Values
-
SELECTION_SCOPE
static final int SELECTION_SCOPE
Selection scope (value1).- Since:
- 2.0
- See Also:
- Constant Field Values
-
WORKING_SET_SCOPE
static final int WORKING_SET_SCOPE
Working set scope (value2).- Since:
- 2.0
- See Also:
- Constant Field Values
-
SELECTED_PROJECTS_SCOPE
static final int SELECTED_PROJECTS_SCOPE
Current Project scope (value3).- Since:
- 3.0
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 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 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
void setSelectedWorkingSets(IWorkingSet[] workingSets)
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
-
-