blob: 4c9d81b3fe9c5314c8b092b9951077248bbceece [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta name="copyright" content=
"Copyright (c) IBM Corporation and others 2000, 2014. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<link rel="STYLESHEET" href="../book.css" charset="ISO-8859-1" type="text/css">
<title>Searching for text within a file</title>
<script language="JavaScript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js" type="text/javascript"></script>
</head>
<body>
<h1>Searching for text within a file</h1>
<p>The <b>Go To</b> selection in the pop-up menu for one of the navigation views allows you to quickly find a
resource in the Workbench by searching resource <i>names</i>.</p>
<p>You can also do contextual searches for information that is contained <i>inside</i> files in the Workbench. To
find all files that contain a particular string of characters:</p>
<ol>
<li>On the main toolbar, click the <a class="command-link" href=
'javascript:executeCommand("org.eclipse.search.ui.openSearchDialog")'><img src=
"PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>Search</b></a> button <img src=
"../images/search.svg" alt="search icon" border="0">.</li>
<li>Go to <b>File Search</b> tab.</li>
<li>Type your search string in the <b>Containing Text</b> field, or use the pull-down list to select a previously
entered search expression.<br>
Use <code>\</code> as an escape character for search strings that contain the special characters <code>*</code>,
<code>?</code>, or <code>\</code>, (for example: <code>d:\\directory\\filename.ext</code>).</li>
<li>Finish entering your search options, (for example, to scope the search to specified file types), and click
<b>Search</b>.</li>
<li>The Search view displays the results of your search. Right-click on any item in the Search view to open a
pop-up menu that allows you to remove items from the list, copy search results to the clipboard, or rerun the
search. To open one of the listed files, double-click it or select <b>Open</b> from its pop-up menu.</li>
</ol>
<p>If you close the Search view, you can return to it later by selecting <a class="command-link" href=
'javascript:executeCommand("org.eclipse.ui.views.showView(org.eclipse.ui.views.showView.viewId=org.eclipse.search.ui.views.SearchView)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.svg" alt="command link"> <b>Window &gt; Show View &gt; Other...
&gt; General &gt; Search</b></a>.</p>
<p>As an alternative to using the Search Dialog and Search View you can also use the <a href=
"../gettingStarted/qs-36c.htm">Quick Text Search</a> dialog. The Quicksearch Dialog is especially suited to jump
around the workspace quickly using textual matches.</p>
<h3 class="related">Related concepts</h3><a href="../concepts/csearchview.htm">Search view</a>
<h3 class="related">Related tasks</h3><a href="../tasks/tasks-84b.htm">Searching for files</a>
<h3 class="related">Related reference</h3><a href="../reference/ref-26.htm">Search view</a><br>
<a href="../reference/ref-45.htm">File search</a>
</body>
</html>