Search Pages
Identifier:
org.eclipse.search.searchPages
Description:
This extension point allows a plug-in to register search
pages for specialized searches. When the search action
is performed on a resource, the search infrastructure
locates the most specific registered search page for it.
Configuration Markup:
<!ELEMENT extension (
page*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED
>
-
point - a fully qualified identifier of the target extension point
-
id - an optional identifier of the extension instance
-
name - an optional name of the extension instance
<!ELEMENT page EMPTY>
<!ATTLIST page
id CDATA #REQUIRED
label CDATA #REQUIRED
class CDATA #REQUIRED
icon CDATA #IMPLIED
sizeHint CDATA #IMPLIED
tabPosition CDATA #IMPLIED
extensions CDATA #IMPLIED
searchViewHelpContextId CDATA #IMPLIED
showScopeSection (true | false)
enabled (true | false)
canSearchEnclosingProjects (true | false)
>
-
id - a unique name that will be used to identify this
search page
-
label - a translatable label that will be used in the search
page tab
-
class - a name of the class which implements org.eclipse.search.ui.ISearchPage. We recommend subclassing
org.eclipse.jface.dialogs.DialogPage.
-
icon - a relative name of the image that will be used
for all resources that match the specified extensions.
If omitted, the search page's tab will only contain a label.
-
sizeHint - a hint for the initial size of the page. This is a string
containing the width and height separated by
comma (e.g. "50, 60"). In the case this hint is
omitted the page will be no larger than the other pages.
-
tabPosition - an integer defining where the page is placed in the page
book. The value does not define the absolute position
but the position relative to the other pages. The ordering
of pages is as follows:
-
if neither page defines the tab position then they are
ordered alphabetically according to their labels
-
if both pages have the tab position specified then the
page with the lower value comes first. If the values
are equal then the pages are treated as if the values
would not exist (see 1.)
-
if only one page has the value specified then this
page comes first
-
extensions - a comma separated list with file extensions on which
the search page can operate. Each extension must
also include a weight (0 meaning lowest weight)
which enables the search infrastructure to find the
best fitting page. The weight is separated from
the extension by a colon. If a search page can
search all possible resources then "*" can be used.
-
searchViewHelpContextId - an optional help context ID of the Search view displaying results of this page. If this attribute is missing then the default search help context ID (org.eclipse.search.search_view_context) is used.
-
showScopeSection - If this attribute is missing or set to "false", then the scope section is not shown in the Search dialog.
To see the scope section, this attribute has to be set to "true".
Plug-ins which add their own Search page and want to see the scope section have to add this to their plugin.xml.
-
enabled - If this attribute is missing or set to "false", then the page is not initially shown in the Search dialog.
The page can be activated by the user via the "Customize..." button on the Search dialog.
-
canSearchEnclosingProjects - If this attribute is missing or set to "false", the "Enclosing Projects" search scope is not shown in the search dialog's scope part.
If the attribute "showScopeSection" is missing or set to "false", this attribute will be ignored.
Examples:
The following is an example of a search page extension
definition:
<extension point=
"org.eclipse.search.searchPages"
>
<page
id=
"org.eclipse.search.ui.text.TextSearchPage"
label=
"Text Search"
icon=
"icons/full/obj16/tsearch_pref.gif"
sizeHint=
"250,160"
tabPosition=
"1"
extensions=
"*:1"
showScopeSection=
"true"
class=
"org.eclipse.search.ui.text.TextSearchPage"
>
</page>
</extension>
Supplied Implementation:
The search infrastructure provides a search page
for full-text search.
Copyright (c) 2001, 2004 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at
https://www.eclipse.org/legal/epl-v10.html