Eclipse Platform
Release 3.2

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.


Field Summary
static int SELECTED_PROJECTS_SCOPE
          Current Project scope (value 3).
static int SELECTION_SCOPE
          Selection scope (value 1).
static int WORKING_SET_SCOPE
          Working set scope (value 2).
static int WORKSPACE_SCOPE
          Workspace scope (value 0).
 
Method Summary
 IRunnableContext getRunnableContext()
          Returns the context for the search operation.
 java.lang.String[] getSelectedProjectNames()
          Returns the names of the enclosing projects if selected by the container or null if the scope is not SELECTED_PROJECTS_SCOPE
 int getSelectedScope()
          Returns search container's selected scope.
 IWorkingSet[] getSelectedWorkingSets()
          Returns the selected working sets of this container.
 ISelection getSelection()
          Returns the selection with which this container was opened.
 boolean hasValidScope()
          Tells whether a valid scope is selected.
 void setPerformActionEnabled(boolean state)
          Sets the enable state of the perform action button of this container.
 void setSelectedScope(int scope)
          Sets the selected scope of this search page container.
 void setSelectedWorkingSets(IWorkingSet[] workingSets)
          Sets the selected working sets of this container.
 

Field Detail

WORKSPACE_SCOPE

static final int WORKSPACE_SCOPE
Workspace scope (value 0).

Since:
2.0
See Also:
Constant Field Values

SELECTION_SCOPE

static final int SELECTION_SCOPE
Selection scope (value 1).

Since:
2.0
See Also:
Constant Field Values

WORKING_SET_SCOPE

static final int WORKING_SET_SCOPE
Working set scope (value 2).

Since:
2.0
See Also:
Constant Field Values

SELECTED_PROJECTS_SCOPE

static final int SELECTED_PROJECTS_SCOPE
Current Project scope (value 3).

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 IRunnableContext for the search operation

setPerformActionEnabled

void setPerformActionEnabled(boolean state)
Sets the enable state of the perform action button of this container.

Parameters:
state - true to 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 true if a valid scope is selected in this search page container
Since:
2.0

getSelectedWorkingSets

IWorkingSet[] getSelectedWorkingSets()
Returns the selected working sets of this container.

Returns:
an array with the selected working sets or null if the scope is not WORKING_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

java.lang.String[] getSelectedProjectNames()
Returns the names of the enclosing projects if selected by the container or null if the scope is not SELECTED_PROJECTS_SCOPE

Returns:
the names of the enclosing project or null if the scope is not SELECTED_PROJECTS_SCOPE.
Since:
3.2

Eclipse Platform
Release 3.2

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.