Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.search/new search/org/eclipse/search')
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchEngine.java10
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchMatchAccess.java28
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchRequestor.java14
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchScope.java26
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/IContextMenuConstants.java38
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/IQueryListener.java14
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/IReplacePage.java4
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchPage.java2
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java40
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageScoreComputer.java2
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchQuery.java16
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchResult.java14
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultListener.java12
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultPage.java24
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultViewPart.java12
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/NewSearchUI.java66
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/SearchResultEvent.java16
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/actions/TextSearchGroup.java29
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchResult.java102
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java182
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/FileTextSearchScope.java56
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/FilterUpdateEvent.java12
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/IEditorMatchAdapter.java14
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/IFileMatchAdapter.java10
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/ISearchEditorAccess.java14
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/Match.java36
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/MatchEvent.java26
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java12
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/RemoveAllEvent.java4
-rw-r--r--org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java51
30 files changed, 443 insertions, 443 deletions
diff --git a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchEngine.java b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchEngine.java
index fa3445e1944..6ea2cb9209f 100644
--- a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchEngine.java
+++ b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchEngine.java
@@ -32,7 +32,7 @@ import org.eclipse.search.internal.ui.SearchPlugin;
* @since 3.2
*/
public abstract class TextSearchEngine {
-
+
/**
* Creates an instance of the search engine. By default this is the default text search engine (see {@link #createDefault()}),
* but extensions can offer more sophisticated search engine implementations.
@@ -41,7 +41,7 @@ public abstract class TextSearchEngine {
public static TextSearchEngine create() {
return SearchPlugin.getDefault().getTextSearchEngineRegistry().getPreferred();
}
-
+
/**
* Creates the default, built-in, text search engine that implements a brute-force search, not using
* any search index.
@@ -53,13 +53,13 @@ public abstract class TextSearchEngine {
public IStatus search(TextSearchScope scope, TextSearchRequestor requestor, Pattern searchPattern, IProgressMonitor monitor) {
return new TextSearchVisitor(requestor, searchPattern).search(scope, monitor);
}
-
+
public IStatus search(IFile[] scope, TextSearchRequestor requestor, Pattern searchPattern, IProgressMonitor monitor) {
return new TextSearchVisitor(requestor, searchPattern).search(scope, monitor);
}
};
}
-
+
/**
* Uses a given search pattern to find matches in the content of workspace file resources. If a file is open in an editor, the
* editor buffer is searched.
@@ -83,5 +83,5 @@ public abstract class TextSearchEngine {
* @return the status containing information about problems in resources searched.
*/
public abstract IStatus search(IFile[] scope, TextSearchRequestor requestor, Pattern searchPattern, IProgressMonitor monitor);
-
+
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchMatchAccess.java b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchMatchAccess.java
index 2ad73b8b776..2abcc6b4d1f 100644
--- a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchMatchAccess.java
+++ b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchMatchAccess.java
@@ -14,10 +14,10 @@ package org.eclipse.search.core.text;
import org.eclipse.core.resources.IFile;
/**
- * A {@link TextSearchMatchAccess} gives access to a pattern match found by the {@link TextSearchEngine}.
+ * A {@link TextSearchMatchAccess} gives access to a pattern match found by the {@link TextSearchEngine}.
* <p>
* Please note that <code>{@link TextSearchMatchAccess}</code> objects <b>do not
- * </b> have value semantic. The state of the object might change over
+ * </b> have value semantic. The state of the object might change over
* time especially since objects are reused for different call backs. Clients shall not keep a reference to
* a {@link TextSearchMatchAccess} element.
* </p>
@@ -27,48 +27,48 @@ import org.eclipse.core.resources.IFile;
* @since 3.2
*/
public abstract class TextSearchMatchAccess {
-
+
/**
* Returns the file the match was found in.
- *
+ *
* @return the file the match was found.
*/
public abstract IFile getFile();
-
+
/**
* Returns the offset of this search match.
- *
+ *
* @return the offset of this search match
*/
public abstract int getMatchOffset();
-
+
/**
* Returns the length of this search match.
- *
+ *
* @return the length of this search match
*/
public abstract int getMatchLength();
-
+
/**
* Returns the length of this file's content.
- *
+ *
* @return the length of this file's content.
*/
public abstract int getFileContentLength();
-
+
/**
* Returns a character of the file's content at the given offset
- *
+ *
* @param offset the offset
* @return the character at the given offset
* @throws IndexOutOfBoundsException an {@link IndexOutOfBoundsException} is
* thrown when the <code>offset</code> is negative or not less than the file content's length.
*/
public abstract char getFileContentChar(int offset);
-
+
/**
* Returns the file's content at the given offsets.
- *
+ *
* @param offset the offset of the requested content
* @param length the of the requested content
* @return the substring of the file's content
diff --git a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchRequestor.java b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchRequestor.java
index 842c1d946ac..6547a66107a 100644
--- a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchRequestor.java
+++ b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchRequestor.java
@@ -16,10 +16,10 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.resources.IFile;
/**
- * Collects the results from a search engine query.
+ * Collects the results from a search engine query.
* Clients implement a subclass to pass to {@link TextSearchEngine#search(TextSearchScope,
* TextSearchRequestor, java.util.regex.Pattern, org.eclipse.core.runtime.IProgressMonitor)}
- * and implement the {@link #acceptPatternMatch(TextSearchMatchAccess)}
+ * and implement the {@link #acceptPatternMatch(TextSearchMatchAccess)}
* method, and possibly override other life cycle methods.
* <p>
* The search engine calls {@link #beginReporting()} when a search starts,
@@ -41,7 +41,7 @@ import org.eclipse.core.resources.IFile;
* @since 3.2
*/
public abstract class TextSearchRequestor {
-
+
/**
* Notification sent before starting the search action.
* Typically, this would tell a search requestor to clear previously
@@ -67,7 +67,7 @@ public abstract class TextSearchRequestor {
public void endReporting() {
// do nothing
}
-
+
/**
* Notification sent before search starts in the given file. This method is called for all files that are contained
* in the search scope.
@@ -83,7 +83,7 @@ public abstract class TextSearchRequestor {
public boolean acceptFile(IFile file) throws CoreException {
return true;
}
-
+
/**
* Notification sent that a file might contain binary context.
* It is the choice of the search engine to report binary files and it is the heuristic of the search engine to decide
@@ -96,14 +96,14 @@ public abstract class TextSearchRequestor {
* <p>
* The default behaviour is to skip binary files
* </p>
- *
+ *
* @param file the file that might be binary
* @return If false, no pattern matches will be reported for the content of this file.
*/
public boolean reportBinaryFile(IFile file) {
return false;
}
-
+
/**
* Accepts the given search match and decides if the search should continue for this file.
*
diff --git a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchScope.java b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchScope.java
index adad971f2b1..a2f13d98603 100644
--- a/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchScope.java
+++ b/org.eclipse.search/new search/org/eclipse/search/core/text/TextSearchScope.java
@@ -27,19 +27,19 @@ import org.eclipse.search.internal.core.text.FilesOfScopeCalculator;
* A {@link TextSearchScope} defines the scope of a search. The scope consists of all workbench resources that are accepted
* by {@link #contains(IResourceProxy)} and that either are a root element ({@link #getRoots()}) or have a root element
* in their parent chain.
- *
+ *
* @see #newSearchScope(IResource[], java.util.regex.Pattern, boolean)
* @since 3.2
*/
public abstract class TextSearchScope {
-
-
+
+
/**
* Creates a scope that consists of all files that match the <code>fileNamePattern</code> and that
* either are one of the roots, or have one of the roots in their parent chain.
* If <code>visitDerivedResources</code> is not enabled, all files that are marked derived or
* have a derived container in their parent chain are not part of the scope.
- *
+ *
* @param rootResources the resources that are the roots of the scope
* @param fileNamePattern file name pattern for this scope.
* @param visitDerivedResources if set also derived folders and files are searched.
@@ -50,32 +50,32 @@ public abstract class TextSearchScope {
scope.setFileNamePattern(fileNamePattern);
return scope;
}
-
-
+
+
/**
* Returns the resources that form the root. Roots can not contain each other. Root elements are only part of the
* scope if they are also accepted by {@link #contains(IResourceProxy)}.
- *
+ *
* @return returns the set of root resources. The default behavior is to return the workspace root.
*/
public IResource[] getRoots() {
return new IResource[] { ResourcesPlugin.getWorkspace().getRoot() };
}
-
+
/**
* Returns if a given resource is part of the scope. If a container is not part of the scope, also all its members
* are not part of the scope.
- *
- * @param proxy the resource proxy to test.
+ *
+ * @param proxy the resource proxy to test.
* @return returns <code>true</code> if a resource is part of the scope. if <code>false</code> is returned the resource
* and all its children are not part of the scope.
*/
public abstract boolean contains(IResourceProxy proxy);
-
+
/**
* Evaluates all files in this scope.
- *
+ *
* @param status a {@link MultiStatus} to collect the error status that occurred while collecting resources.
* @return returns the files in the scope.
*/
@@ -83,5 +83,5 @@ public abstract class TextSearchScope {
return new FilesOfScopeCalculator(this, status).process();
}
-
+
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/IContextMenuConstants.java b/org.eclipse.search/new search/org/eclipse/search/ui/IContextMenuConstants.java
index 48ba05f173d..669c22c6007 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/IContextMenuConstants.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/IContextMenuConstants.java
@@ -17,9 +17,9 @@ import org.eclipse.ui.IWorkbenchActionConstants;
* <p>
* This interface declares constants only; it is not intended to be implemented.
* </p>
- *
+ *
* @since 2.0
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IContextMenuConstants {
@@ -47,7 +47,7 @@ public interface IContextMenuConstants {
* </p>
*/
public static final String GROUP_OPEN= "group.open"; //$NON-NLS-1$
-
+
/**
* Pop-up menu: name of group for show actions (value <code>"group.show"</code>).
* <p>
@@ -59,7 +59,7 @@ public interface IContextMenuConstants {
* </p>
*/
public static final String GROUP_SHOW= "group.show"; //$NON-NLS-1$
-
+
/**
* Pop-up menu: name of group for new actions (value <code>"group.new"</code>).
* <p>
@@ -76,53 +76,53 @@ public interface IContextMenuConstants {
* Pop-up menu: name of group for build actions (value <code>"group.build"</code>).
*/
public static final String GROUP_BUILD= "group.build"; //$NON-NLS-1$
-
+
/**
* Pop-up menu: name of group for reorganize actions (value <code>"group.reorganize"</code>).
- */
- public static final String GROUP_REORGANIZE= IWorkbenchActionConstants.GROUP_REORGANIZE;
-
+ */
+ public static final String GROUP_REORGANIZE= IWorkbenchActionConstants.GROUP_REORGANIZE;
+
/**
* Pop-up menu: name of group for code generation or refactoring actions (
* value <code>"group.generate"</code>).
- */
+ */
public static final String GROUP_GENERATE= "group.generate"; //$NON-NLS-1$
/**
* Pop-up menu: name of group for search actions (value <code>"group.search"</code>).
- */
+ */
public static final String GROUP_SEARCH= "group.search"; //$NON-NLS-1$
-
+
/**
* Pop-up menu: name of group for additional actions (value <code>"group.additions"</code>).
- */
+ */
public static final String GROUP_ADDITIONS= "additions"; //$NON-NLS-1$
/**
* Pop-up menu: name of group for viewer setup actions (value <code>"group.viewerSetup"</code>).
- */
+ */
public static final String GROUP_VIEWER_SETUP= "group.viewerSetup"; //$NON-NLS-1$
-
+
/**
* Pop-up menu: name of group for filtering (value <code>"group.filtering"</code>).
* @since 3.3
- */
+ */
public static final String GROUP_FILTERING= "group.filtering"; //$NON-NLS-1$
/**
* Pop-up menu: name of group for properties actions (value <code>"group.properties"</code>).
- */
+ */
public static final String GROUP_PROPERTIES= "group.properties"; //$NON-NLS-1$
/**
* Pop-up menu: name of group for cut/copy/paste actions (value <code>"group.edit"</code>).
* @since 3.3
*/
- public static final String GROUP_EDIT = "group.edit"; //$NON-NLS-1$
-
+ public static final String GROUP_EDIT = "group.edit"; //$NON-NLS-1$
+
/**
* Pop-up menu: name of group for remove match actions (value <code>"group.removeMatches"</code>).
* @since 2.1
- */
+ */
public static final String GROUP_REMOVE_MATCHES= "group.removeMatches"; //$NON-NLS-1$
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/IQueryListener.java b/org.eclipse.search/new search/org/eclipse/search/ui/IQueryListener.java
index 84d72cad92a..1eee41d4bf2 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/IQueryListener.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/IQueryListener.java
@@ -13,36 +13,36 @@ package org.eclipse.search.ui;
/**
* <p>A listener for changes to the set of search queries. Queries are added by running
- * them via {@link org.eclipse.search.ui.NewSearchUI#runQueryInBackground(ISearchQuery) NewSearchUI#runQueryInBackground(ISearchQuery)} or
+ * them via {@link org.eclipse.search.ui.NewSearchUI#runQueryInBackground(ISearchQuery) NewSearchUI#runQueryInBackground(ISearchQuery)} or
* {@link org.eclipse.search.ui.NewSearchUI#runQueryInForeground(org.eclipse.jface.operation.IRunnableContext,ISearchQuery) NewSearchUI#runQueryInForeground(IRunnableContext,ISearchQuery)}</p>
* <p>The search UI determines when queries are rerun, stopped or deleted (and will notify
* interested parties via this interface). Listeners can be added and removed in the {@link org.eclipse.search.ui.NewSearchUI NewSearchUI} class.
* </p>
* <p>Clients may implement this interface.</p>
- *
+ *
* @since 3.0
*/
public interface IQueryListener {
/**
* Called when an query has been added to the system.
- *
+ *
* @param query the query that has been added
*/
-
+
void queryAdded(ISearchQuery query);
/**
* Called when a query has been removed.
- *
+ *
* @param query the query that has been removed
*/
void queryRemoved(ISearchQuery query);
-
+
/**
* Called before an <code>ISearchQuery</code> is starting.
* @param query the query about to start
*/
void queryStarting(ISearchQuery query);
-
+
/**
* Called after an <code>ISearchQuery</code> has finished.
* @param query the query that has finished
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/IReplacePage.java b/org.eclipse.search/new search/org/eclipse/search/ui/IReplacePage.java
index d00f95e94df..cb921611d78 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/IReplacePage.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/IReplacePage.java
@@ -12,7 +12,7 @@ package org.eclipse.search.ui;
/**
* An extension interface to <code>ISearchPage</code>. If clients implement
- * <code>IReplacePage</code> in addition to <code>ISearchPage</code>, a
+ * <code>IReplacePage</code> in addition to <code>ISearchPage</code>, a
* "Replace" button will be shown in the search dialog.
*
* @since 3.0
@@ -27,5 +27,5 @@ public interface IReplacePage {
* @return <code>true</code> if the dialog can be closed after execution
*/
public boolean performReplace();
-
+
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPage.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPage.java
index 1012f536578..b308f24220e 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPage.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPage.java
@@ -21,7 +21,7 @@ import org.eclipse.jface.dialogs.IDialogPage;
* button is pressed.
* </p>
* <p>
- * If the search page additionally implements {@link IReplacePage}, a
+ * If the search page additionally implements {@link IReplacePage}, a
* 'Replace' button will be shown in the search dialog.
* </p>
*
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java
index b39adaf6a91..605269559a8 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageContainer.java
@@ -23,37 +23,37 @@ import org.eclipse.ui.IWorkingSet;
* <p>
* This interface is not intended to be implemented by clients.
* </p>
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISearchPageContainer {
/**
* Workspace scope (value <code>0</code>).
- *
+ *
* @since 2.0
- */
+ */
public static final int WORKSPACE_SCOPE= 0;
/**
* Selection scope (value <code>1</code>).
- *
+ *
* @since 2.0
- */
+ */
public static final int SELECTION_SCOPE= 1;
/**
* Working set scope (value <code>2</code>).
- *
+ *
* @since 2.0
- */
+ */
public static final int WORKING_SET_SCOPE= 2;
/**
* Current Project scope (value <code>3</code>).
- *
+ *
* @since 3.0
- */
+ */
public static final int SELECTED_PROJECTS_SCOPE= 3;
/**
@@ -61,7 +61,7 @@ public interface ISearchPageContainer {
*
* @return the selection passed to this container when it was opened
*/
- public ISelection getSelection();
+ public ISelection getSelection();
/**
* Returns the context for the search operation.
@@ -82,24 +82,24 @@ public interface ISearchPageContainer {
/**
* Returns search container's selected scope.
* The scope is WORKSPACE_SCOPE, SELECTED_PROJECTS_SCOPE, SELECTION_SCOPE or WORKING_SET_SCOPE.
- *
+ *
* @return the selected scope
* @since 2.0
- */
+ */
public int getSelectedScope();
/**
* Sets the selected scope of this search page container.
* The scope is WORKSPACE_SCOPE, SELECTED_PROJECTS_SCOPE, SELECTION_SCOPE or WORKING_SET_SCOPE.
* @param scope the newly selected scope
- *
+ *
* @since 2.0
- */
+ */
public void setSelectedScope(int scope);
/**
* Tells whether a valid scope is selected.
- *
+ *
* @return a <code>true</code> if a valid scope is selected in this search page container
* @since 2.0
*/
@@ -107,7 +107,7 @@ public interface ISearchPageContainer {
/**
* Returns the selected working sets of this container.
- *
+ *
* @return an array with the selected working sets or <code>null</code> if the scope is not {@link #WORKING_SET_SCOPE}
* @since 2.0
*/
@@ -115,19 +115,19 @@ public interface ISearchPageContainer {
/**
* Sets the selected working sets of this container.
- *
+ *
* @param workingSets an array of IWorkingSet
* @since 2.0
*/
public void setSelectedWorkingSets(IWorkingSet[] workingSets);
-
+
/**
* Returns the names of the enclosing projects if selected by the container or <code>null</code>
* if the scope is not {@link #SELECTED_PROJECTS_SCOPE}
- *
+ *
* @return the names of the enclosing project or <code>null</code> if the scope is not {@link #SELECTED_PROJECTS_SCOPE}.
* @since 3.2
*/
public String[] getSelectedProjectNames();
-
+
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageScoreComputer.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageScoreComputer.java
index 4443266c7a2..b37f8a9f900 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageScoreComputer.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchPageScoreComputer.java
@@ -20,7 +20,7 @@ package org.eclipse.search.ui;
* For example, a Java-specific search page score computer could test
* if the page is a Java search page and returns high scores
* for Java elements as selection input.
- *
+ *
* Intended to be implemented.
* </p>
*/
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchQuery.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchQuery.java
index ffeb98c5311..8037de1fb35 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchQuery.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchQuery.java
@@ -23,17 +23,17 @@ import org.eclipse.core.runtime.OperationCanceledException;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @since 3.0
*/
public interface ISearchQuery {
/**
* This is the method that actually does the work, i.e. finds the results of
* the search query.
- *
+ *
* @param monitor the progress monitor to be used
- *
- * @return the status after completion of the search job.
+ *
+ * @return the status after completion of the search job.
* @throws OperationCanceledException Thrown when the search query has been canceled.
*/
IStatus run(IProgressMonitor monitor) throws OperationCanceledException;
@@ -43,14 +43,14 @@ public interface ISearchQuery {
* the background. Note that progress notification (for example, the number
* of matches found) should be done via the progress monitor passed into the
* <code>run(IProgressMonitor)</code> method
- *
+ *
* @return the user readable label of this query
*/
String getLabel();
/**
* Returns whether the query can be run more than once. Some queries may
* depend on transient information and return <code>false</code>.
- *
+ *
* @return whether this query can be run more than once
*/
boolean canRerun();
@@ -58,14 +58,14 @@ public interface ISearchQuery {
* Returns whether this query can be run in the background. Note that
* queries must do proper locking when they are run in the background (e.g.
* get the appropriate workspace locks).
- *
+ *
* @return whether this query can be run in the background
*/
boolean canRunInBackground();
/**
* Returns the search result associated with this query. This method can be
* called before run is called.
- *
+ *
* @return this query's search result
*/
ISearchResult getSearchResult();
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResult.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResult.java
index 603fc2a1123..e82afd97a5b 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResult.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResult.java
@@ -28,7 +28,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
* <p>
* Clients may implement this interface.
* </p>
- *
+ *
* @see org.eclipse.search.ui.ISearchResultPage
* @since 3.0
*/
@@ -36,39 +36,39 @@ public interface ISearchResult {
/**
* Adds a <code>ISearchResultListener</code>. Has no effect when the
* listener has already been added.
- *
+ *
* @param l the listener to be added
*/
void addListener(ISearchResultListener l);
/**
* Removes a <code>ISearchResultChangedListener</code>. Has no effect
* when the listener hasn't previously been added.
- *
+ *
* @param l the listener to be removed
*/
void removeListener(ISearchResultListener l);
/**
* Returns a user readable label for this search result. The label is typically used in the result
* view and should contain the search query string and number of matches.
- *
+ *
* @return the label for this search result
*/
String getLabel();
/**
* Returns a tooltip to be used when this search result is shown in the UI.
- *
+ *
* @return a user readable String
*/
String getTooltip();
/**
* Returns an image descriptor for the given ISearchResult.
- *
+ *
* @return an image representing this search result or <code>null</code>
*/
ImageDescriptor getImageDescriptor();
/**
* Returns the query that produced this search result.
- *
+ *
* @return the query producing this result
*/
ISearchQuery getQuery();
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultListener.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultListener.java
index 75550e29d29..61a406a500b 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultListener.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultListener.java
@@ -11,11 +11,11 @@
package org.eclipse.search.ui;
/**
* Listener interface for changes to an <code>ISearchResult</code>.
- * Implementers of <code>ISearchResult</code> should define subclasses of
+ * Implementers of <code>ISearchResult</code> should define subclasses of
* <code>SearchResultEvent</code> and send those to registered listeners. Implementers of
- * <code>ISearchResultListener</code> will in general know the concrete class of search
+ * <code>ISearchResultListener</code> will in general know the concrete class of search
* result they are listening to, and therefore the kind of events they
- * have to handle.
+ * have to handle.
* <p>
* Clients may implement this interface.
* </p>
@@ -26,9 +26,9 @@ public interface ISearchResultListener {
* Called to notify listeners of changes in a <code>ISearchResult</code>.
* The event object <code>e</code> is only guaranteed to be valid for
* the duration of the call.
- *
- * @param e the event object describing the change. Note that implementers
- * of <code>ISearchResult</code> will be sending subclasses of
+ *
+ * @param e the event object describing the change. Note that implementers
+ * of <code>ISearchResult</code> will be sending subclasses of
* <code>SearchResultEvent</code>
*/
void searchResultChanged(SearchResultEvent e);
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultPage.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultPage.java
index 7bf76009ee0..d728cc993a7 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultPage.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultPage.java
@@ -28,7 +28,7 @@ public interface ISearchResultPage extends IPageBookViewPage {
* page. For example, the current selection in a viewer. The UI state will
* be later passed into the <code>setInput()</code> method when the
* currently shown <code>ISearchResult</code> is shown again.
- *
+ *
* @return an object representing the UI state of this page
*/
Object getUIState();
@@ -36,10 +36,10 @@ public interface ISearchResultPage extends IPageBookViewPage {
* Sets the search result to be shown in this search results page.
* Implementers should restore UI state (e.g. selection) from the previously
* saved <code>uiState</code> object.
- *
+ *
* @param search the search result to be shown or <code>null</code> to clear the page.
* @param uiState the previously saved UI state
- *
+ *
* @see ISearchResultPage#getUIState()
*/
void setInput(ISearchResult search, Object uiState);
@@ -47,49 +47,49 @@ public interface ISearchResultPage extends IPageBookViewPage {
/**
* Sets the search view this search results page is shown in. This method will be called before
* the page is shown for the first time (i.e. before the page control is created).
- *
+ *
* @param part the parent search view
*/
void setViewPart(ISearchResultViewPart part);
/**
* Restores the page state. Note that this applies only to state that is
* saved across sessions.
- *
+ *
* @param memento a memento to restore the page state from or <code>null</code>
* if no previous state was saved
- *
+ *
* @see #setInput(ISearchResult, Object)
*/
void restoreState(IMemento memento);
/**
* Saves the page state in a memento. Note that this applies to state that
* should persist across sessions.
- *
+ *
* @param memento a memento to receive the object state
- *
+ *
* @see #getUIState()
*/
void saveState(IMemento memento);
/**
* Sets the id for this page. This method will be called before any other
* initialization is done.
- *
+ *
* @param id the id for this page
*/
void setID(String id);
/**
* Returns the id set via <code>setID</code>.
- *
+ *
* @return the id of this page
*/
String getID();
-
+
/**
* Returns a user readable label for this search result page. The label will be
* used to describe the contents for the page to the user (for example it will be
* displayed in the search view title bar). To take an example from file search,
* a label might read like this: 'test' - 896 matches in workspace.
- *
+ *
* @return the user readable label for this search result page
*/
String getLabel();
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultViewPart.java b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultViewPart.java
index e435c88bccb..aeed4486dda 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultViewPart.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/ISearchResultViewPart.java
@@ -22,30 +22,30 @@ import org.eclipse.ui.IViewPart;
* <p>
* This interface is not intended to be implemented by clients
* </p>
- *
+ *
* @see NewSearchUI#activateSearchResultView()
* @see NewSearchUI#getSearchResultView()
- *
+ *
* @since 3.0
- *
+ *
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISearchResultViewPart extends IViewPart {
/**
* Search result pages should call this method to have the search results view contribute to
* their context menus.
- *
+ *
* @param menuManager the menu manager the search result view should contribute to
*/
void fillContextMenu(IMenuManager menuManager);
/**
* Returns the <code>ISearchResultPage</code> currently shown in this
* search view. Returns <code>null</code> if no page is currently shown.
- *
+ *
* @return the active <code>ISearchResultPage</code> or <code>null</code>
*/
ISearchResultPage getActivePage();
-
+
/**
* Requests that the search view updates the label it is showing for search result
* pages. Typically, a search result page will call this method when the search result
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/NewSearchUI.java b/org.eclipse.search/new search/org/eclipse/search/ui/NewSearchUI.java
index bfac5246116..19f32d9ac81 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/NewSearchUI.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/NewSearchUI.java
@@ -26,16 +26,16 @@ import org.eclipse.search2.internal.ui.SearchMessages;
/**
* A facade for access to the new search UI facilities.
- *
+ *
* @since 3.0
- *
+ *
*/
public class NewSearchUI {
/**
* Activates a search result view in the current workbench window page. If a
* search view is already open in the current workbench window page, it is
* activated. Otherwise a new search view is opened and activated.
- *
+ *
* @return the activate search result view or <code>null</code> if the
* search result view couldn't be activated
*/
@@ -44,7 +44,7 @@ public class NewSearchUI {
}
/**
* Gets the search result view shown in the current workbench window.
- *
+ *
* @return the search result view or <code>null</code>, if none is open
* in the current workbench window page
*/
@@ -57,7 +57,7 @@ public class NewSearchUI {
* returns <code>true</code>. Running a query adds it to the set of known
* queries and notifies any registered <code>IQueryListener</code>s about
* the addition.
- *
+ *
* @param query
* the query to execute
* @deprecated deprecated in 3.1.
@@ -76,22 +76,22 @@ public class NewSearchUI {
if (!status.isOK())
SearchPlugin.log(status);
if (status.getSeverity() == IStatus.ERROR) {
- ErrorDialog.openError(SearchPlugin.getActiveWorkbenchShell(), SearchMessages.NewSearchUI_error_title, SearchMessages.NewSearchUI_error_label, status);
+ ErrorDialog.openError(SearchPlugin.getActiveWorkbenchShell(), SearchMessages.NewSearchUI_error_title, SearchMessages.NewSearchUI_error_label, status);
}
}
}
}
-
+
/**
* Runs the given search query. This method will execute the query in a
- * background thread and not block until the search is finished.
+ * background thread and not block until the search is finished.
* Running a query adds it to the set of known queries and notifies
* any registered {@link IQueryListener}s about the addition.
* <p>
* The search view that shows the result will be activated. That means a call
* to {@link #activateSearchResultView} is not required.
* </p>
- *
+ *
* @param query
* the query to execute. The query must be able to run in background, that means
* {@link ISearchQuery#canRunInBackground()} must be <code>true</code>
@@ -104,17 +104,17 @@ public class NewSearchUI {
}
runQueryInBackground(query, null);
}
-
+
/**
* Runs the given search query. This method will execute the query in a
- * background thread and not block until the search is finished.
+ * background thread and not block until the search is finished.
* Running a query adds it to the set of known queries and notifies
* any registered {@link IQueryListener}s about the addition.
* <p>
* The result will be shown in the given search result view which will be activated. A call to
* to {@link #activateSearchResultView} is not required.
* </p>
- *
+ *
* @param query
* the query to execute. The query must be able to run in background, that means
* {@link ISearchQuery#canRunInBackground()} must be <code>true</code>
@@ -133,7 +133,7 @@ public class NewSearchUI {
else
throw new IllegalArgumentException("Query can not be run in background"); //$NON-NLS-1$
}
-
+
/**
* Runs the given search query. This method will execute the query in the
* same thread as the caller. This method blocks until the query is
@@ -143,7 +143,7 @@ public class NewSearchUI {
* The result will be shown in a search view that will be activated. That means a call
* to {@link #activateSearchResultView} is not required.
* </p>
- *
+ *
* @param context
* the runnable context to run the query in
* @param query
@@ -157,7 +157,7 @@ public class NewSearchUI {
}
return runQueryInForeground(context, query, null);
}
-
+
/**
* Runs the given search query. This method will execute the query in the
* same thread as the caller. This method blocks until the query is
@@ -167,7 +167,7 @@ public class NewSearchUI {
* The result will be shown in the given search result view which will be activated. A call to
* to {@link #activateSearchResultView} is not required.
* </p>
- *
+ *
* @param context
* the runnable context to run the query in
* @param query
@@ -177,7 +177,7 @@ public class NewSearchUI {
* mechanism is used to open a new result view or to select the view to be reused.
* @return a status indicating whether the query ran correctly, including {@link IStatus#CANCEL} to signal
* that the query was canceled.
- *
+ *
* @since 3.2
*/
public static IStatus runQueryInForeground(IRunnableContext context, ISearchQuery query, ISearchResultViewPart view) {
@@ -186,13 +186,13 @@ public class NewSearchUI {
}
return InternalSearchUI.getInstance().runSearchInForeground(context, query, view);
}
-
+
/**
* Registers the given listener to receive notification of changes to
* queries. The listener will be notified whenever a query has been added,
* removed, is starting or has finished. Has no effect if an identical
* listener is already registered.
- *
+ *
* @param l
* the listener to be added
*/
@@ -202,7 +202,7 @@ public class NewSearchUI {
/**
* Removes the given query listener. Does nothing if the listener is not
* present.
- *
+ *
* @param l
* the listener to be removed.
*/
@@ -212,17 +212,17 @@ public class NewSearchUI {
/**
* Returns all search queries know to the search UI (i.e. registered via
* <code>runQuery()</code> or <code>runQueryInForeground())</code>.
- *
+ *
* @return all search results
*/
public static ISearchQuery[] getQueries() {
return InternalSearchUI.getInstance().getQueries();
}
-
+
/**
* Returns whether the given query is currently running. Queries may be run
* by client request or by actions in the search UI.
- *
+ *
* @param query
* the query
* @return whether the given query is currently running
@@ -235,11 +235,11 @@ public class NewSearchUI {
}
return InternalSearchUI.getInstance().isQueryRunning(query);
}
-
+
/**
* Sends a 'cancel' command to the given query running in background.
- * The call has no effect if the query is not running, not in background or is not cancelable.
- *
+ * The call has no effect if the query is not running, not in background or is not cancelable.
+ *
* @param query
* the query
* @since 3.1
@@ -250,25 +250,25 @@ public class NewSearchUI {
}
InternalSearchUI.getInstance().cancelSearch(query);
}
-
+
/**
* Search Plug-in Id (value <code>"org.eclipse.search"</code>).
*/
public static final String PLUGIN_ID= "org.eclipse.search"; //$NON-NLS-1$
- /**
+ /**
* Search marker type (value <code>"org.eclipse.search.searchmarker"</code>).
*
* @see org.eclipse.core.resources.IMarker
- */
+ */
public static final String SEARCH_MARKER= PLUGIN_ID + ".searchmarker"; //$NON-NLS-1$
- /**
+ /**
* Id of the new Search view
* (value <code>"org.eclipse.search.ui.views.SearchView"</code>).
*/
public static final String SEARCH_VIEW_ID= "org.eclipse.search.ui.views.SearchView"; //$NON-NLS-1$
-
+
/**
* Id of the Search action set
* (value <code>"org.eclipse.search.searchActionSet"</code>).
@@ -287,12 +287,12 @@ public class NewSearchUI {
*/
public static void openSearchDialog(IWorkbenchWindow window, String pageId) {
new OpenSearchDialogAction(window, pageId).run();
- }
+ }
/**
* Returns the preference whether editors should be reused
* when showing search results.
- *
+ *
* The goto action can decide to use or ignore this preference.
*
* @return <code>true</code> if editors should be reused for showing search results
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/SearchResultEvent.java b/org.eclipse.search/new search/org/eclipse/search/ui/SearchResultEvent.java
index 0faee480f31..0efb49efc69 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/SearchResultEvent.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/SearchResultEvent.java
@@ -16,28 +16,28 @@ import java.util.EventObject;
* The common superclass of all events sent from <code>ISearchResults</code>.
* This class is supposed to be subclassed to provide more specific
* notification.
- *
+ *
* @see org.eclipse.search.ui.ISearchResultListener#searchResultChanged(SearchResultEvent)
- *
+ *
* @since 3.0
*/
public abstract class SearchResultEvent extends EventObject {
-
+
private static final long serialVersionUID= -4877459368182725252L;
-
-
+
+
/**
* Creates a new search result event for the given search result.
- *
+ *
* @param searchResult the source of the event
*/
protected SearchResultEvent(ISearchResult searchResult) {
super(searchResult);
}
-
+
/**
* Gets the <code>ISearchResult</code> for this event.
- *
+ *
* @return the source of this event
*/
public ISearchResult getSearchResult() {
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/actions/TextSearchGroup.java b/org.eclipse.search/new search/org/eclipse/search/ui/actions/TextSearchGroup.java
index 5b4b82c2e0e..675740a4e51 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/actions/TextSearchGroup.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/actions/TextSearchGroup.java
@@ -1,12 +1,12 @@
/*******************************************************************************
* Copyright (c) 2006, 2007 Wind River Systems 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Markus Schorn - initial API and implementation
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.search.ui.actions;
@@ -19,6 +19,7 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.actions.ActionGroup;
+
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
import org.eclipse.search2.internal.ui.SearchMessages;
@@ -30,11 +31,11 @@ import org.eclipse.search2.internal.ui.text2.FindInWorkspaceActionDelegate;
/**
* Action group that adds a sub-menu with text search actions to a context menu.
- *
+ *
* @since 3.2
*/
public class TextSearchGroup extends ActionGroup {
-
+
private static final String CTX_MENU_ID= "org.eclipse.search.text.ctxmenu"; //$NON-NLS-1$
private String fAppendToGroup= ITextEditorActionConstants.GROUP_FIND;
@@ -45,17 +46,17 @@ public class TextSearchGroup extends ActionGroup {
* Constructs a TextSearchGroup for adding actions to the context menu
* of the editor provided. The editor will be accessed for the purpose of
* determining the search string.
- *
- * @param editor the editor
+ *
+ * @param editor the editor
*/
public TextSearchGroup(IEditorPart editor) {
createActions(editor);
}
/**
- * Changes the text that is used for the submenu label. The default is
+ * Changes the text that is used for the submenu label. The default is
* "Search Text".
- *
+ *
* @param text the text for the menu label.
*/
public void setMenuText(String text) {
@@ -65,7 +66,7 @@ public class TextSearchGroup extends ActionGroup {
/**
* Changes the group where the submenu is appended to. The default is
* ITextEditorActionConstants.GROUP_FIND.
- *
+ *
* @param groupID the group id to append to
*/
public void setAppendToGroup(String groupID) {
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchResult.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchResult.java
index 40cd78a0a1e..d67c5c44c8f 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchResult.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchResult.java
@@ -24,15 +24,15 @@ import org.eclipse.search.ui.SearchResultEvent;
/**
* An abstract base implementation for text-match based search results. This search
- * result implementation consists of a list of {@link org.eclipse.search.ui.text.Match matches}.
+ * result implementation consists of a list of {@link org.eclipse.search.ui.text.Match matches}.
* No assumptions are made about the kind of elements these matches are reported against.
- *
- * @since 3.0
+ *
+ * @since 3.0
*/
public abstract class AbstractTextSearchResult implements ISearchResult {
-
+
private static final Match[] EMPTY_ARRAY= new Match[0];
-
+
private final Map fElementsToMatches;
private final List fListeners;
private final MatchEvent fMatchEvent;
@@ -46,14 +46,14 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
fElementsToMatches= new HashMap();
fListeners= new ArrayList();
fMatchEvent= new MatchEvent(this);
-
+
fMatchFilters= null; // filtering disabled by default
}
-
+
/**
* Returns an array with all matches reported against the given element.
* Note that all matches of the given element are returned. The filter state of the matches is not relevant.
- *
+ *
* @param element the element to report matches for
* @return all matches reported for this element
* @see Match#getElement()
@@ -66,14 +66,14 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
return EMPTY_ARRAY;
}
}
-
+
/**
* Adds a <code>Match</code> to this search result. This method does nothing if the
* match is already present.
* <p>
* Subclasses may extend this method.
* </p>
- *
+ *
* @param match the match to add
*/
public void addMatch(Match match) {
@@ -84,9 +84,9 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
if (hasAdded)
fireChange(getSearchResultEvent(match, MatchEvent.ADDED));
}
-
+
/**
- * Adds a number of Matches to this search result. This method does nothing for
+ * Adds a number of Matches to this search result. This method does nothing for
* matches that are already present.
* <p>
* Subclasses may extend this method.
@@ -104,7 +104,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
if (!reallyAdded.isEmpty())
fireChange(getSearchResultEvent(reallyAdded, MatchEvent.ADDED));
}
-
+
private MatchEvent getSearchResultEvent(Match match, int eventKind) {
fMatchEvent.setKind(eventKind);
fMatchEvent.setMatch(match);
@@ -120,7 +120,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
private boolean doAddMatch(Match match) {
updateFilterState(match);
-
+
List matches= (List) fElementsToMatches.get(match.getElement());
if (matches == null) {
matches= new ArrayList();
@@ -134,12 +134,12 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
}
return false;
}
-
+
private static void insertSorted(List matches, Match match) {
int insertIndex= getInsertIndex(matches, match);
matches.add(insertIndex, match);
}
-
+
private static int getInsertIndex(List matches, Match match) {
int count= matches.size();
int min = 0, max = count - 1;
@@ -178,7 +178,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
private void doRemoveAll() {
fElementsToMatches.clear();
}
-
+
/**
* Removes the given match from this search result. This method has no
* effect if the match is not found.
@@ -195,14 +195,14 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
if (existed)
fireChange(getSearchResultEvent(match, MatchEvent.REMOVED));
}
-
+
/**
* Removes the given matches from this search result. This method has no
* effect for matches that are not found
* <p>
* Subclasses may extend this method.
* </p>
- *
+ *
* @param matches the matches to remove
*/
public void removeMatches(Match[] matches) {
@@ -217,7 +217,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
fireChange(getSearchResultEvent(existing, MatchEvent.REMOVED));
}
-
+
private boolean doRemoveMatch(Match match) {
boolean existed= false;
List matches= (List) fElementsToMatches.get(match.getElement());
@@ -228,7 +228,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
}
return existed;
}
-
+
/**
* {@inheritDoc}
*/
@@ -237,7 +237,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
fListeners.add(l);
}
}
-
+
/**
* {@inheritDoc}
*/
@@ -246,13 +246,13 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
fListeners.remove(l);
}
}
-
+
/**
* Send the given <code>SearchResultEvent</code> to all registered search
* result listeners.
- *
+ *
* @param e the event to be sent
- *
+ *
* @see ISearchResultListener
*/
protected void fireChange(SearchResultEvent e) {
@@ -265,7 +265,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
((ISearchResultListener) listeners.next()).searchResultChanged(e);
}
}
-
+
private void updateFilterStateForAllMatches() {
boolean disableFiltering= getActiveMatchFilters() == null;
ArrayList changed= new ArrayList();
@@ -281,7 +281,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
Match[] allChanges= (Match[]) changed.toArray(new Match[changed.size()]);
fireChange(new FilterUpdateEvent(this, allChanges, getActiveMatchFilters()));
}
-
+
/*
* Evaluates the filter for the match and updates it. Return true if the filter changed.
*/
@@ -290,7 +290,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
if (matchFilters == null) {
return false; // do nothing, no change
}
-
+
boolean oldState= match.isFiltered();
for (int i= 0; i < matchFilters.length; i++) {
if (matchFilters[i].filters(match)) {
@@ -301,11 +301,11 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
match.setFiltered(false);
return oldState;
}
-
+
/**
* Returns the total number of matches contained in this search result.
* The filter state of the matches is not relevant when counting matches. All matches are counted.
- *
+ *
* @return total number of matches
*/
public int getMatchCount() {
@@ -319,12 +319,12 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
}
return count;
}
-
+
/**
* Returns the number of matches reported against a given element. This is
* equivalent to calling <code>getMatches(element).length</code>
* The filter state of the matches is not relevant when counting matches. All matches are counted.
- *
+ *
* @param element the element to get the match count for
* @return the number of matches reported against the element
*/
@@ -334,12 +334,12 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
return matches.size();
return 0;
}
-
+
/**
* Returns an array containing the set of all elements that matches are
* reported against in this search result.
* Note that all elements that contain matches are returned. The filter state of the matches is not relevant.
- *
+ *
* @return the set of elements in this search result
*/
public Object[] getElements() {
@@ -347,7 +347,7 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
return fElementsToMatches.keySet().toArray();
}
}
-
+
/**
* Sets the active match filters for this result. If set to non-null, the match filters will be used to update the filter
* state ({@link Match#isFiltered()} of matches and the {@link AbstractTextSearchViewPage} will only
@@ -355,63 +355,63 @@ public abstract class AbstractTextSearchResult implements ISearchResult {
* the filter state of the match is ignored by the {@link AbstractTextSearchViewPage} and all matches
* are shown.
* Note the model contains all matches, regardless if the filter state of a match.
- *
+ *
* @param filters the match filters to set or <code>null</code> if the filter state of the match
* should be ignored.
- *
+ *
* @since 3.3
*/
public void setActiveMatchFilters(MatchFilter[] filters) {
fMatchFilters= filters;
updateFilterStateForAllMatches();
}
-
+
/**
* Returns the active match filters for this result. If not null is returned, the match filters will be used to update the filter
* state ({@link Match#isFiltered()} of matches and the {@link AbstractTextSearchViewPage} will only
* show non-filtered matches. If <code>null</code> is set
* the filter state of the match is ignored by the {@link AbstractTextSearchViewPage} and all matches
* are shown.
- *
+ *
* @return the match filters to be used or <code>null</code> if the filter state of the match
* should be ignored.
- *
+ *
* @since 3.3
*/
public MatchFilter[] getActiveMatchFilters() {
return fMatchFilters;
}
-
+
/**
* Returns all applicable filters for this result or null if match filters are not supported. If match filters are returned,
* the {@link AbstractTextSearchViewPage} will contain menu entries in the view menu.
- *
- * @return all applicable filters for this result.
- *
+ *
+ * @return all applicable filters for this result.
+ *
* @since 3.3
*/
public MatchFilter[] getAllMatchFilters() {
return null;
}
-
+
/**
* Returns an implementation of <code>IEditorMatchAdapter</code> appropriate
* for this search result.
- *
+ *
* @return an appropriate adapter or <code>null</code> if none has been implemented
- *
+ *
* @see IEditorMatchAdapter
*/
public abstract IEditorMatchAdapter getEditorMatchAdapter();
-
+
/**
* Returns an implementation of <code>IFileMatchAdapter</code> appropriate
- * for this search result.
- *
+ * for this search result.
+ *
* @return an appropriate adapter or <code>null</code> if none has been implemented
- *
+ *
* @see IFileMatchAdapter
*/
public abstract IFileMatchAdapter getFileMatchAdapter();
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java
index 31dd71dc205..e9c50210de2 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/AbstractTextSearchViewPage.java
@@ -119,17 +119,17 @@ import org.eclipse.search2.internal.ui.text.PositionTracker;
* provider and a content provider. <br>
* Changes in the search result are handled by updating the viewer in the
* <code>elementsChanged()</code> and <code>clear()</code> methods.
- *
+ *
* @since 3.0
*/
public abstract class AbstractTextSearchViewPage extends Page implements ISearchResultPage {
private class UpdateUIJob extends UIJob {
-
+
public UpdateUIJob() {
super(SearchMessages.AbstractTextSearchViewPage_update_job_name);
setSystem(true);
}
-
+
public IStatus runInUIThread(IProgressMonitor monitor) {
Control control= getControl();
if (control == null || control.isDisposed()) {
@@ -155,19 +155,19 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
fViewPart.updateLabel();
return Status.OK_STATUS;
}
-
+
/*
* Undocumented for testing only. Used to find UpdateUIJobs.
*/
public boolean belongsTo(Object family) {
return family == AbstractTextSearchViewPage.this;
}
-
+
}
-
+
private class SelectionProviderAdapter implements ISelectionProvider, ISelectionChangedListener {
private ArrayList fListeners= new ArrayList(5);
-
+
public void addSelectionChangedListener(ISelectionChangedListener listener) {
fListeners.add(listener);
}
@@ -198,12 +198,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
private volatile boolean fIsUIUpdateScheduled= false;
private volatile boolean fScheduleEnsureSelection= false;
private static final String KEY_LAYOUT = "org.eclipse.search.resultpage.layout"; //$NON-NLS-1$
-
+
/**
* An empty array.
*/
protected static final Match[] EMPTY_MATCH_ARRAY= new Match[0];
-
+
private StructuredViewer fViewer;
private Composite fViewerContainer;
private Control fBusyLabel;
@@ -212,7 +212,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
private ISearchResultViewPart fViewPart;
private Set fBatchedUpdates;
private boolean fBatchedClearAll;
-
+
private ISearchResultListener fListener;
private IQueryListener fQueryListener;
private MenuManager fMenu;
@@ -224,10 +224,10 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
private Action fRemoveAllResultsAction;
private Action fShowNextAction;
private Action fShowPreviousAction;
-
+
private ExpandAllAction fExpandAllAction;
private CollapseAllAction fCollapseAllAction;
-
+
private SetLayoutAction fFlatAction;
private SetLayoutAction fHierarchicalAction;
private int fCurrentLayout;
@@ -236,10 +236,10 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
private final int fSupportedLayouts;
private SelectionProviderAdapter fViewerAdapter;
private SelectAllAction fSelectAllAction;
-
+
private IAction[] fFilterActions;
private Integer fElementLimit;
-
+
/**
* Flag (<code>value 1</code>) denoting flat list layout.
*/
@@ -249,12 +249,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
*/
public static final int FLAG_LAYOUT_TREE = 2;
-
+
/**
* This constructor must be passed a combination of layout flags combined
* with bitwise or. At least one flag must be passed in (i.e. 0 is not a
* permitted value).
- *
+ *
* @param supportedLayouts
* flags determining which layout options this page supports.
* Must not be 0
@@ -274,12 +274,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
fExpandAllAction= new ExpandAllAction();
fCollapseAllAction= new CollapseAllAction();
}
-
+
fSelectAllAction= new SelectAllAction();
createLayoutActions();
fBatchedUpdates = new HashSet();
fBatchedClearAll= false;
-
+
fListener = new ISearchResultListener() {
public void searchResultChanged(SearchResultEvent e) {
handleSearchResultChanged(e);
@@ -288,7 +288,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
fFilterActions= null;
fElementLimit= null;
}
-
+
private void initLayout() {
if (supportsTreeLayout())
fCurrentLayout = FLAG_LAYOUT_TREE;
@@ -298,13 +298,13 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Constructs this page with the default layout flags.
- *
+ *
* @see AbstractTextSearchViewPage#AbstractTextSearchViewPage(int)
*/
protected AbstractTextSearchViewPage() {
this(FLAG_LAYOUT_FLAT | FLAG_LAYOUT_TREE);
}
-
+
private void createLayoutActions() {
if (countBits(fSupportedLayouts) > 1) {
@@ -314,7 +314,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
SearchPluginImages.setImageDescriptors(fHierarchicalAction, SearchPluginImages.T_LCL, SearchPluginImages.IMG_LCL_SEARCH_HIERARCHICAL_LAYOUT);
}
}
-
+
private int countBits(int layoutFlags) {
int bitCount = 0;
for (int i = 0; i < 32; i++) {
@@ -332,7 +332,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Returns a dialog settings object for this search result page. There will be
* one dialog settings object per search result page id.
- *
+ *
* @return the dialog settings for this search result page
* @see AbstractTextSearchViewPage#getID()
*/
@@ -357,7 +357,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
public String getID() {
return fId;
}
-
+
/**
* {@inheritDoc}
*/
@@ -372,12 +372,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* Opens an editor on the given element and selects the given range of text. If a search results
* implements a <code>IFileMatchAdapter</code>, match locations will be tracked and the current
* match range will be passed into this method.
- *
+ *
* @param match the match to show
* @param currentOffset the current start offset of the match
* @param currentLength the current length of the selection
* @throws PartInitException if an editor can't be opened
- *
+ *
* @see org.eclipse.core.filebuffers.ITextFileBufferManager
* @see IFileMatchAdapter
* @deprecated Use {@link #showMatch(Match, int, int, boolean)} instead
@@ -392,7 +392,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* this method.
* If the <code>activate</code> parameter is <code>true</code> the opened editor
* should have be activated. Otherwise the focus should not be changed.
- *
+ *
* @param match
* the match to show
* @param currentOffset
@@ -403,7 +403,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* whether to activate the editor.
* @throws PartInitException
* if an editor can't be opened
- *
+ *
* @see org.eclipse.core.filebuffers.ITextFileBufferManager
* @see IFileMatchAdapter
*/
@@ -418,7 +418,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* occurred by the time this method is called. They will be described in a
* future call.
* <p>The changed elements are evaluated by {@link #evaluateChangedElements(Match[], Set)}.</p>
- *
+ *
* @param objects
* array of objects that has to be refreshed
*/
@@ -437,7 +437,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* Configures the given viewer. Implementers have to set at least a content
* provider and a label provider. This method may be called if the page was
* constructed with the flag <code>FLAG_LAYOUT_TREE</code>.
- *
+ *
* @param viewer the viewer to be configured
*/
protected abstract void configureTreeViewer(TreeViewer viewer);
@@ -446,7 +446,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* Configures the given viewer. Implementers have to set at least a content
* provider and a label provider. This method may be called if the page was
* constructed with the flag <code>FLAG_LAYOUT_FLAT</code>.
- *
+ *
* @param viewer the viewer to be configured
*/
protected abstract void configureTableViewer(TableViewer viewer);
@@ -454,7 +454,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Fills the context menu for this page. Subclasses may override this
* method.
- *
+ *
* @param mgr the menu manager representing the context menu
*/
protected void fillContextMenu(IMenuManager mgr) {
@@ -466,7 +466,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
if (canRemoveMatchesWith(getViewer().getSelection()))
mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveSelectedMatches);
mgr.appendToGroup(IContextMenuConstants.GROUP_REMOVE_MATCHES, fRemoveAllResultsAction);
-
+
if (getLayout() == FLAG_LAYOUT_TREE) {
mgr.appendToGroup(IContextMenuConstants.GROUP_SHOW, fExpandAllAction);
}
@@ -510,7 +510,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
// Register menu
getSite().registerContextMenu(fViewPart.getViewSite().getId(), fMenu, fViewerAdapter);
-
+
createViewer(fViewerContainer, fCurrentLayout);
showBusyLabel(fIsBusyShown);
NewSearchUI.addQueryListener(fQueryListener);
@@ -597,10 +597,10 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Determines whether a certain layout is supported by this search result
* page.
- *
+ *
* @param layout the layout to test for
* @return whether the given layout is supported or not
- *
+ *
* @see AbstractTextSearchViewPage#AbstractTextSearchViewPage(int)
*/
public boolean isLayoutSupported(int layout) {
@@ -613,7 +613,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* it must be one of the values passed during construction of this search
* result page.
* @param layout the new layout
- *
+ *
* @see AbstractTextSearchViewPage#isLayoutSupported(int)
*/
public void setLayout(int layout) {
@@ -650,9 +650,9 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Return the layout this page is currently using.
- *
+ *
* @return the layout this page is currently using
- *
+ *
* @see #FLAG_LAYOUT_FLAT
* @see #FLAG_LAYOUT_TREE
*/
@@ -672,16 +672,16 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
fCollapseAllAction.setViewer(viewer);
fExpandAllAction.setViewer(viewer);
}
-
+
fCopyToClipboardAction.setViewer(fViewer);
fSelectAllAction.setViewer(fViewer);
-
+
IToolBarManager tbm = getSite().getActionBars().getToolBarManager();
tbm.removeAll();
SearchView.createToolBarGroups(tbm);
fillToolbar(tbm);
tbm.update(false);
-
+
new OpenAndLinkWithEditorHelper(fViewer) {
protected void activate(ISelection selection) {
@@ -710,12 +710,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
fRemoveSelectedMatches.setEnabled(canRemoveMatchesWith(event.getSelection()));
}
});
-
+
fViewer.addSelectionChangedListener(fViewerAdapter);
-
+
Menu menu = fMenu.createContextMenu(fViewer.getControl());
fViewer.getControl().setMenu(menu);
-
+
updateLayoutActions();
getViewPart().updateLabel();
}
@@ -723,7 +723,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Creates the tree viewer to be shown on this page. Clients may override
* this method.
- *
+ *
* @param parent the parent widget
* @return returns a newly created <code>TreeViewer</code>.
*/
@@ -734,7 +734,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Creates the table viewer to be shown on this page. Clients may override
* this method.
- *
+ *
* @param parent the parent widget
* @return returns a newly created <code>TableViewer</code>
*/
@@ -764,7 +764,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
public void setInput(ISearchResult newSearch, Object viewState) {
if (newSearch != null && !(newSearch instanceof AbstractTextSearchResult))
return; // ignore
-
+
AbstractTextSearchResult oldSearch= fInput;
if (oldSearch != null) {
disconnectViewer();
@@ -773,21 +773,21 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
AnnotationManagers.removeSearchResult(getSite().getWorkbenchWindow(), oldSearch);
}
fInput= (AbstractTextSearchResult) newSearch;
-
+
if (fInput != null) {
AnnotationManagers.addSearchResult(getSite().getWorkbenchWindow(), fInput);
-
+
fInput.addListener(fListener);
connectViewer(fInput);
if (viewState instanceof ISelection)
fViewer.setSelection((ISelection) viewState, true);
else
navigateNext(true);
-
+
updateBusyLabel();
turnOffDecoration();
scheduleUIUpdate();
-
+
fFilterActions= addFilterActionsToViewMenu();
} else {
getViewPart().updateLabel();
@@ -805,23 +805,23 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
menu.remove(MatchFilterSelectionAction.ACTION_ID);
}
-
+
private IAction[] addFilterActionsToViewMenu() {
AbstractTextSearchResult input= getInput();
if (input == null) {
return null;
}
-
+
MatchFilter[] allMatchFilters= input.getAllMatchFilters();
if (allMatchFilters == null && getElementLimit() == null) {
return null;
}
-
+
IActionBars bars= getSite().getActionBars();
IMenuManager menu= bars.getMenuManager();
-
+
menu.prependToGroup(IContextMenuConstants.GROUP_FILTERING, new MatchFilterSelectionAction(this));
-
+
if (allMatchFilters != null) {
MatchFilterAction[] actions= new MatchFilterAction[allMatchFilters.length];
for (int i= allMatchFilters.length - 1; i >= 0; i--) {
@@ -833,7 +833,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
return null;
}
-
+
private void updateFilterActions(IAction[] filterActions) {
if (filterActions != null) {
for (int i= 0; i < filterActions.length; i++) {
@@ -862,7 +862,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Returns the viewer currently used in this page.
- *
+ *
* @return the currently used viewer or <code>null</code> if none has been
* created yet.
*/
@@ -889,9 +889,9 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Returns the currently shown result.
- *
+ *
* @return the previously set result or <code>null</code>
- *
+ *
* @see AbstractTextSearchViewPage#setInput(ISearchResult, Object)
*/
public AbstractTextSearchResult getInput() {
@@ -935,7 +935,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
showCurrentMatch(activateEditor);
}
-
+
private void navigateNext(boolean forward) {
INavigate navigator = null;
if (fViewer instanceof TableViewer) {
@@ -957,7 +957,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Returns the currently selected match.
- *
+ *
* @return the selected match or <code>null</code> if none are selected
*/
public Match getCurrentMatch() {
@@ -969,7 +969,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
return null;
}
-
+
/**
* Returns the matches that are currently displayed for the given element.
* If {@link AbstractTextSearchResult#getActiveMatchFilters()} is not null, only matches are returned
@@ -978,7 +978,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* Any action operating on the visible matches in the search
* result page should use this method to get the matches for a search
* result (instead of asking the search result directly).
- *
+ *
* @param element
* The element to get the matches for
* @return The matches displayed for the given element. If the current input
@@ -1002,7 +1002,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
if (count == matches.length)
return matches;
-
+
Match[] filteredMatches= new Match[count];
for (int i= 0, k= 0; i < matches.length; i++) {
if (matches[i] != null)
@@ -1010,7 +1010,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
return filteredMatches;
}
-
+
/**
* Returns the current location of the match. This takes possible
* modifications of the file into account. Therefore the result may
@@ -1018,12 +1018,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* off the match.
* @param match the match to get the position for.
* @return the current position of the match.
- *
+ *
* @since 3.2
*/
public IRegion getCurrentMatchLocation(Match match) {
PositionTracker tracker= InternalSearchUI.getInstance().getPositionTracker();
-
+
int offset, length;
Position pos= tracker.getCurrentPosition(match);
if (pos == null) {
@@ -1035,7 +1035,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
return new Region(offset, length);
}
-
+
/**
* Returns the number of matches that are currently displayed for the given
* element. If {@link AbstractTextSearchResult#getActiveMatchFilters()} is not null, only matches
@@ -1043,7 +1043,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* Any action operating on the visible matches in the
* search result page should use this method to get the match count for a
* search result (instead of asking the search result directly).
- *
+ *
* @param element
* The element to get the matches for
* @return The number of matches displayed for the given element. If the
@@ -1109,7 +1109,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Fills the toolbar contribution for this page. Subclasses may override
* this method.
- *
+ *
* @param tbm the tool bar manager representing the view's toolbar
*/
protected void fillToolbar(IToolBarManager tbm) {
@@ -1149,7 +1149,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
/**
* Returns the view part set with
* <code>setViewPart(ISearchResultViewPart)</code>.
- *
+ *
* @return The view part or <code>null</code> if the view part hasn't been
* set yet (or set to null).
*/
@@ -1158,11 +1158,11 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
}
// multi-threaded update handling.
-
+
/**
* Handles a search result event for the current search result.
* @param e the event to handle
- *
+ *
* @since 3.2
*/
protected void handleSearchResultChanged(final SearchResultEvent e) {
@@ -1175,12 +1175,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
updateFilterActions(fFilterActions);
}
}
-
+
/**
* Evaluates the elements to that are later passed to {@link #elementsChanged(Object[])}. By default
* the element to change are the elements received by ({@link Match#getElement()}). Client implementations
* can modify this behavior.
- *
+ *
* @param matches the matches that were added or removed
* @param changedElements the set that collects the elements to change. Clients should only add elements to the set.
* @since 3.4
@@ -1190,7 +1190,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
changedElements.add(matches[i].getElement());
}
}
-
+
private synchronized void postUpdate(Match[] matches) {
evaluateChangedElements(matches, fBatchedUpdates);
scheduleUIUpdate();
@@ -1302,7 +1302,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* Removes the currently selected match. Does nothing if no match is
* selected.
* </p>
- *
+ *
* @noreference This method is not intended to be referenced by clients.
*/
public void internalRemoveSelected() {
@@ -1311,7 +1311,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
return;
StructuredViewer viewer = getViewer();
IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
-
+
HashSet set = new HashSet();
if (viewer instanceof TreeViewer) {
ITreeContentProvider cp = (ITreeContentProvider) viewer.getContentProvider();
@@ -1320,7 +1320,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
collectAllMatches(set, selection.toArray());
}
navigateNext(true);
-
+
Match[] matches = new Match[set.size()];
set.toArray(matches);
result.removeMatches(matches);
@@ -1345,7 +1345,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
collectAllMatchesBelow(result, set, cp, children);
}
}
-
+
private void turnOffDecoration() {
IBaseLabelProvider lp= fViewer.getLabelProvider();
if (lp instanceof DecoratingLabelProvider) {
@@ -1357,7 +1357,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
IBaseLabelProvider lp= fViewer.getLabelProvider();
if (lp instanceof DecoratingLabelProvider) {
((DecoratingLabelProvider)lp).setLabelDecorator(PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator());
-
+
}
}
@@ -1371,7 +1371,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* </p>
* @param event
* the event sent for the currently shown viewer
- *
+ *
* @see IOpenListener
*/
protected void handleOpen(OpenEvent event) {
@@ -1393,7 +1393,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
gotoNextMatch(OpenStrategy.activateOnOpen());
}
}
-
+
/**
* Sets the maximal number of top level elements to be shown in a viewer.
* If <code>null</code> is set, the view page does not support to limit the elements and will not provide
@@ -1408,12 +1408,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* <li><code>-1</code> to not limit and provide configuration UI</li>
* <li><code>positive integer</code> to limit by the given value and provide configuration UI</li>
* </dl>
- *
+ *
* @since 3.3
*/
public void setElementLimit(Integer limit) {
fElementLimit= limit;
-
+
if (fViewer != null) {
fViewer.refresh();
}
@@ -1421,7 +1421,7 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
fViewPart.updateLabel();
}
}
-
+
/**
* Gets the maximal number of top level elements to be shown in a viewer.
* <code>null</code> means the view page does not limit the elements and will not provide
@@ -1434,12 +1434,12 @@ public abstract class AbstractTextSearchViewPage extends Page implements ISearch
* <li><code>-1</code> to not limit and provide configuration UI</li>
* <li><code>positive integer</code> to limit by the given value and provide configuration UI</li>
* </dl>
- *
+ *
* @since 3.3
*/
public Integer getElementLimit() {
return fElementLimit;
}
-
-
+
+
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/FileTextSearchScope.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/FileTextSearchScope.java
index 23b6e706276..20aee64f64a 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/FileTextSearchScope.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/FileTextSearchScope.java
@@ -43,26 +43,26 @@ import org.eclipse.search.internal.ui.util.FileTypeEditor;
* Clients should not instantiate or subclass this class.
* </p>
* @since 3.2
- *
+ *
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public final class FileTextSearchScope extends TextSearchScope {
-
+
private static final boolean IS_CASE_SENSITIVE_FILESYSTEM = !new File("Temp").equals(new File("temp")); //$NON-NLS-1$ //$NON-NLS-2$
/**
* Returns a scope for the workspace. The created scope contains all resources in the workspace
* that match the given file name patterns. Depending on <code>includeDerived</code>, derived resources or
* resources inside a derived container are part of the scope or not.
- *
- * @param fileNamePatterns file name pattern that all files have to match <code>null</code> to include all file names.
+ *
+ * @param fileNamePatterns file name pattern that all files have to match <code>null</code> to include all file names.
* @param includeDerived defines if derived files and files inside derived containers are included in the scope.
* @return a scope containing all files in the workspace that match the given file name patterns.
*/
public static FileTextSearchScope newWorkspaceScope(String[] fileNamePatterns, boolean includeDerived) {
- return new FileTextSearchScope(SearchMessages.WorkspaceScope, new IResource[] { ResourcesPlugin.getWorkspace().getRoot() }, null, fileNamePatterns, includeDerived);
+ return new FileTextSearchScope(SearchMessages.WorkspaceScope, new IResource[] { ResourcesPlugin.getWorkspace().getRoot() }, null, fileNamePatterns, includeDerived);
}
-
+
/**
* Returns a scope for the given root resources. The created scope contains all root resources and their
* children that match the given file name patterns. Depending on <code>includeDerived</code>, derived resources or
@@ -75,7 +75,7 @@ public final class FileTextSearchScope extends TextSearchScope {
*/
public static FileTextSearchScope newSearchScope(IResource[] roots, String[] fileNamePatterns, boolean includeDerived) {
roots= removeRedundantEntries(roots, includeDerived);
-
+
String description;
if (roots.length == 0) {
description= SearchMessages.FileTextSearchScope_scope_empty;
@@ -90,14 +90,14 @@ public final class FileTextSearchScope extends TextSearchScope {
description= Messages.format(label, new String[] { roots[0].getName(), roots[1].getName()});
}
return new FileTextSearchScope(description, roots, null, fileNamePatterns, includeDerived);
- }
+ }
/**
* Returns a scope for the given working sets. The created scope contains all resources in the
* working sets that match the given file name patterns. Depending on <code>includeDerived</code>, derived resources or
* resources inside a derived container are part of the scope or not.
- *
- * @param workingSets the working sets defining the scope.
+ *
+ * @param workingSets the working sets defining the scope.
* @param fileNamePatterns file name pattern that all files have to match <code>null</code> to include all file names.
* @param includeDerived defines if derived files and files inside derived containers are included in the scope.
* @return a scope containing the resources in the working set if they match the given file name patterns.
@@ -126,7 +126,7 @@ public final class FileTextSearchScope extends TextSearchScope {
private final String[] fFileNamePatterns;
private final Matcher fPositiveFileNameMatcher;
private final Matcher fNegativeFileNameMatcher;
-
+
private boolean fVisitDerived;
private IWorkingSet[] fWorkingSets;
@@ -139,10 +139,10 @@ public final class FileTextSearchScope extends TextSearchScope {
fPositiveFileNameMatcher= createMatcher(fileNamePatterns, false);
fNegativeFileNameMatcher= createMatcher(fileNamePatterns, true);
}
-
+
/**
* Returns the description of the scope
- *
+ *
* @return the description of the scope
*/
public String getDescription() {
@@ -152,17 +152,17 @@ public final class FileTextSearchScope extends TextSearchScope {
/**
* Returns the file name pattern configured for this scope or <code>null</code> to match
* all file names.
- *
+ *
* @return the file name pattern starings
*/
public String[] getFileNamePatterns() {
return fFileNamePatterns;
}
-
+
/**
- * Returns the working-sets that were used to configure this scope or <code>null</code>
+ * Returns the working-sets that were used to configure this scope or <code>null</code>
* if the scope was not created off working sets.
- *
+ *
* @return the working-sets the scope is based on.
*/
public IWorkingSet[] getWorkingSets() {
@@ -172,16 +172,16 @@ public final class FileTextSearchScope extends TextSearchScope {
/**
* Returns the content types configured for this scope or <code>null</code> to match
* all content types.
- *
+ *
* @return the file name pattern starings
*/
public IContentType[] getContentTypes() {
return null; // to be implemented in the future
}
-
+
/**
* Returns a description describing the file name patterns and content types.
- *
+ *
* @return the description of the scope
*/
public String getFilterDescription() {
@@ -199,16 +199,16 @@ public final class FileTextSearchScope extends TextSearchScope {
}
return BasicElementLabels.getFilePattern(buf.toString());
}
-
+
/**
* Returns whether derived resources are included in this search scope.
- *
+ *
* @return whether derived resources are included in this search scope.
*/
public boolean includeDerived() {
return fVisitDerived;
}
-
+
/* (non-Javadoc)
* @see org.eclipse.search.core.text.FileSearchScope#getRoots()
*/
@@ -223,13 +223,13 @@ public final class FileTextSearchScope extends TextSearchScope {
if (!fVisitDerived && proxy.isDerived()) {
return false; // all resources in a derived folder are considered to be derived, see bug 103576
}
-
+
if (proxy.getType() == IResource.FILE) {
return matchesFileName(proxy.getName());
}
return true;
}
-
+
private boolean matchesFileName(String fileName) {
if (fPositiveFileNameMatcher != null && !fPositiveFileNameMatcher.reset(fileName).matches()) {
return false;
@@ -239,7 +239,7 @@ public final class FileTextSearchScope extends TextSearchScope {
}
return true;
}
-
+
private Matcher createMatcher(String[] fileNamePatterns, boolean negativeMatcher) {
if (fileNamePatterns == null || fileNamePatterns.length == 0) {
return null;
@@ -263,7 +263,7 @@ public final class FileTextSearchScope extends TextSearchScope {
}
return null;
}
-
+
private static IResource[] removeRedundantEntries(IResource[] elements, boolean includeDerived) {
ArrayList res= new ArrayList();
for (int i= 0; i < elements.length; i++) {
@@ -290,7 +290,7 @@ public final class FileTextSearchScope extends TextSearchScope {
}
return (IResource[]) res.toArray(new IResource[res.size()]);
}
-
+
private static void addToList(ArrayList res, IResource curr, boolean includeDerived) {
if (!includeDerived && isDerived(curr)) {
return;
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/FilterUpdateEvent.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/FilterUpdateEvent.java
index 4cc01c8f139..3e0ef9b3fb7 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/FilterUpdateEvent.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/FilterUpdateEvent.java
@@ -27,10 +27,10 @@ public class FilterUpdateEvent extends SearchResultEvent {
private final Match[] fMatches;
private final MatchFilter[] fFilters;
-
+
/**
* Constructs a new {@link FilterUpdateEvent}.
- *
+ *
* @param searchResult the search result concerned
* @param matches the matches updated by the filter change
* @param filters the currently activated filters
@@ -40,19 +40,19 @@ public class FilterUpdateEvent extends SearchResultEvent {
fMatches= matches;
fFilters= filters;
}
-
+
/**
* Returns the matches updated by the filter update.
- *
+ *
* @return the matches updated by the filter update
*/
public Match[] getUpdatedMatches() {
return fMatches;
}
-
+
/**
* Returns the the filters currently set, or <code>null</code> if filters have been disabled.
- *
+ *
* @return the filters currently set
*/
public MatchFilter[] getActiveFilters() {
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/IEditorMatchAdapter.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/IEditorMatchAdapter.java
index f15d2c4a76f..18269a88f7d 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/IEditorMatchAdapter.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/IEditorMatchAdapter.java
@@ -13,7 +13,7 @@ package org.eclipse.search.ui.text;
import org.eclipse.ui.IEditorPart;
/**
- * This interface serves as an adapter between matches and editors. It is used to
+ * This interface serves as an adapter between matches and editors. It is used to
* highlight matches in editors. Search implementors who want their matches highlighted
* must return an implementation of <code>IEditorMatchAdapter</code> from the <code>getEditorMatchAdapter()</code>
* method in their search result subclass.
@@ -23,15 +23,15 @@ import org.eclipse.ui.IEditorPart;
* Clients may implement this interface.
* </p>
* @see org.eclipse.search.ui.text.AbstractTextSearchResult
- *
+ *
* @since 3.0
*/
public interface IEditorMatchAdapter {
/**
* Determines whether a match should be displayed in the given editor.
- * For example, if a match is reported in a file, This method should return
- * <code>true</code>, if the given editor displays the file.
- *
+ * For example, if a match is reported in a file, This method should return
+ * <code>true</code>, if the given editor displays the file.
+ *
* @param match The match
* @param editor The editor that possibly contains the matches element
* @return whether the given match should be displayed in the editor
@@ -43,11 +43,11 @@ public interface IEditorMatchAdapter {
* For example, if the editor shows a particular file, all matches in that file should
* be returned.
* @param result the result to search for matches
- *
+ *
* @param editor The editor.
* @return All matches that are contained in the element that is shown in
* the given editor.
*/
public abstract Match[] computeContainedMatches(AbstractTextSearchResult result, IEditorPart editor);
-
+
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/IFileMatchAdapter.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/IFileMatchAdapter.java
index c4d50154872..f634e610b7d 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/IFileMatchAdapter.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/IFileMatchAdapter.java
@@ -22,7 +22,7 @@ import org.eclipse.core.resources.IFile;
* Clients may implement this interface.
* </p>
* @see org.eclipse.search.ui.text.AbstractTextSearchResult
- *
+ *
* @since 3.0
*/
public interface IFileMatchAdapter {
@@ -30,10 +30,10 @@ public interface IFileMatchAdapter {
* Returns an array with all matches contained in the given file in the
* given search result. If the matches are not contained within an
* <code>IFile</code>, this method must return an empty array.
- *
+ *
* @param result the search result to find matches in
* @param file the file to find matches in
- *
+ *
* @return an array of matches (possibly empty)
*/
public abstract Match[] computeContainedMatches(AbstractTextSearchResult result, IFile file);
@@ -41,9 +41,9 @@ public interface IFileMatchAdapter {
* Returns the file associated with the given element (usually the file the
* element is contained in). If the element is not associated with a file,
* this method should return <code>null</code>.
- *
+ *
* @param element an element associated with a match
- *
+ *
* @return the file associated with the element or <code>null</code>
*/
public abstract IFile getFile(Object element);
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/ISearchEditorAccess.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/ISearchEditorAccess.java
index 4f12f467ce3..1785df18777 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/ISearchEditorAccess.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/ISearchEditorAccess.java
@@ -15,14 +15,14 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.IAnnotationModel;
/**
- * <p>This interface allows editors to provide customized access to editor internals for the
- * search implementation to highlight matches. The search system will use the document to
- * do line/character offset conversion if needed and it will add annotations to the annotation
+ * <p>This interface allows editors to provide customized access to editor internals for the
+ * search implementation to highlight matches. The search system will use the document to
+ * do line/character offset conversion if needed and it will add annotations to the annotation
* model.</p>
- * <p> The search system will ask an editor for an adapter of this class whenever it needs
- * access to the document or the annotation model of the editor. Since an editor might use
- * multiple documents and/or annotation models, the match is passed in when asking the editor.
- * The editor is then expected to return the proper annotation model or document for the given
+ * <p> The search system will ask an editor for an adapter of this class whenever it needs
+ * access to the document or the annotation model of the editor. Since an editor might use
+ * multiple documents and/or annotation models, the match is passed in when asking the editor.
+ * The editor is then expected to return the proper annotation model or document for the given
* match.</p>
* <p>
* This interface is intended to be implemented by clients.
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/Match.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/Match.java
index 2b31033abe9..4bf70e38498 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/Match.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/Match.java
@@ -18,17 +18,17 @@ import org.eclipse.core.runtime.Assert;
* against is assumed to contain the match, and the UI will group matches
* against the same element together. A match has an offset and a length which
* may be specified in characters or in lines.
- *
+ *
* @since 3.0
*/
public class Match {
-
+
/**
* A constant expressing that offset and length of this match are specified
* in lines
*/
public static final int UNIT_LINE= 1;
-
+
/**
* A constant expressing that offset and length of this match are specified
* in characters
@@ -36,7 +36,7 @@ public class Match {
public static final int UNIT_CHARACTER= 2;
private static final int IS_FILTERED= 1 << 2;
-
+
private Object fElement;
private int fOffset;
private int fLength;
@@ -44,7 +44,7 @@ public class Match {
/**
* Constructs a new Match object.
- *
+ *
* @param element
* the element that contains the match
* @param unit
@@ -65,7 +65,7 @@ public class Match {
/**
* Constructs a new Match object. The offset and length will be based on
* characters.
- *
+ *
* @param element
* the element that contains the match
* @param offset
@@ -79,7 +79,7 @@ public class Match {
/**
* Returns the offset of this match.
- *
+ *
* @return the offset
*/
public int getOffset() {
@@ -88,7 +88,7 @@ public class Match {
/**
* Sets the offset of this match.
- *
+ *
* @param offset
* the offset to set
*/
@@ -98,7 +98,7 @@ public class Match {
/**
* Returns the length of this match.
- *
+ *
* @return the length
*/
public int getLength() {
@@ -107,7 +107,7 @@ public class Match {
/**
* Sets the length.
- *
+ *
* @param length
* the length to set
*/
@@ -117,7 +117,7 @@ public class Match {
/**
* Returns the element that contains this match. The element is used to group the match.
- *
+ *
* @return the element that contains this match
*/
public Object getElement() {
@@ -127,7 +127,7 @@ public class Match {
/**
* Returns whether match length and offset are expressed in lines or
* characters.
- *
+ *
* @return either UNIT_LINE or UNIT_CHARACTER;
*/
public int getBaseUnit() {
@@ -135,13 +135,13 @@ public class Match {
return UNIT_LINE;
return UNIT_CHARACTER;
}
-
+
/**
* Marks this match as filtered or not.
- *
+ *
* @param value <code>true</code> if the match is filtered;
* otherwise <code>false</code>
- *
+ *
* @since 3.1
*/
public void setFiltered(boolean value) {
@@ -151,13 +151,13 @@ public class Match {
fFlags &= (~IS_FILTERED);
}
}
-
+
/**
* Returns whether this match is filtered or not.
- *
+ *
* @return <code>true<code> if the match is filtered;
* otherwise <code>false</code>
- *
+ *
* @since 3.1
*/
public boolean isFiltered() {
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchEvent.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchEvent.java
index 4f7052722d2..0bdde79062c 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchEvent.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchEvent.java
@@ -27,31 +27,31 @@ public class MatchEvent extends SearchResultEvent {
private Match[] fMatchContainer = new Match[1];
/**
* Constant for a matches being added.
- *
+ *
* @see MatchEvent#getKind()
*/
public static final int ADDED = 1;
/**
* Constant for a matches being removed.
- *
+ *
* @see MatchEvent#getKind()
*/
public static final int REMOVED = 2;
-
+
private static final Match[] fgEmtpyMatches = new Match[0];
-
+
/**
* Constructs a new <code>MatchEvent</code>.
- *
+ *
* @param searchResult the search result concerned
*/
public MatchEvent(ISearchResult searchResult) {
super(searchResult);
}
-
+
/**
* Tells whether this is a remove or an add.
- *
+ *
* @return one of <code>ADDED</code> or <code>REMOVED</code>
*/
public int getKind() {
@@ -59,7 +59,7 @@ public class MatchEvent extends SearchResultEvent {
}
/**
* Returns the concerned matches.
- *
+ *
* @return the matches this event is about
*/
public Match[] getMatches() {
@@ -70,10 +70,10 @@ public class MatchEvent extends SearchResultEvent {
else
return fgEmtpyMatches;
}
-
+
/**
* Sets the kind of event this is.
- *
+ *
* @param kind the kind to set; either <code>ADDED</code> or <code>REMOVED</code>
*/
protected void setKind(int kind) {
@@ -81,17 +81,17 @@ public class MatchEvent extends SearchResultEvent {
}
/**
* Sets the match for the change this event reports.
- *
+ *
* @param match the match to set
*/
protected void setMatch(Match match) {
fMatchContainer[0] = match;
fMatches = null;
}
-
+
/**
* Sets the matches for the change this event reports.
- *
+ *
* @param matches the matches to set
*/
protected void setMatches(Match[] matches) {
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java
index eb98e31d622..451a760db1e 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/MatchFilter.java
@@ -17,7 +17,7 @@ package org.eclipse.search.ui.text;
* @since 3.3
*/
public abstract class MatchFilter {
-
+
/**
* Returns whether the given match is filtered by this filter.
*
@@ -25,21 +25,21 @@ public abstract class MatchFilter {
* @return returns <code>true</code> if the given match should be filtered or <code>false</code> if not.
*/
public abstract boolean filters(Match match);
-
+
/**
* Returns the name of the filter as shown in the match filter selection dialog.
*
* @return the name of the filter as shown in the match filter selection dialog.
*/
public abstract String getName();
-
+
/**
* Returns the description of the filter as shown in the match filter selection dialog.
*
* @return the description of the filter as shown in the match filter selection dialog.
*/
public abstract String getDescription();
-
+
/**
* Returns the label of the filter as shown by the filter action.
*
@@ -48,10 +48,10 @@ public abstract class MatchFilter {
public abstract String getActionLabel();
/**
- * Returns an ID of this filter.
+ * Returns an ID of this filter.
*
* @return the id of the filter to be used when persisting this filter.
*/
public abstract String getID();
-
+
}
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/RemoveAllEvent.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/RemoveAllEvent.java
index 6b1ba519b3e..850b0178a5c 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/RemoveAllEvent.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/RemoveAllEvent.java
@@ -13,11 +13,11 @@ import org.eclipse.search.ui.ISearchResult;
import org.eclipse.search.ui.SearchResultEvent;
/**
* An event indicating that all matches have been removed from a <code>AbstractTextSearchResult</code>.
- *
+ *
* <p>
* Clients may instantiate or subclass this class.
* </p>
- *
+ *
* @since 3.0
*/
public class RemoveAllEvent extends SearchResultEvent {
diff --git a/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java b/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java
index e676e0dd3b6..73475f7c83c 100644
--- a/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java
+++ b/org.eclipse.search/new search/org/eclipse/search/ui/text/TextSearchQueryProvider.java
@@ -1,12 +1,12 @@
/*******************************************************************************
* Copyright (c) 2006 Wind River Systems 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Markus Schorn - initial API and implementation
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.search.ui.text;
@@ -17,14 +17,13 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.ui.IWorkingSet;
-import org.eclipse.search.ui.ISearchQuery;
-
import org.eclipse.search.internal.ui.SearchPlugin;
+import org.eclipse.search.ui.ISearchQuery;
/**
* Abstract base class for text search query providers supplied via the <code>org.eclipse.search.textSearchQueryProvider</code>
* extension point. The plug-in preference <code>org.eclipse.search.textSearchQueryProvider<code> defines the preferred
- * query provider. It is intended that only products choose a preferred query provider.
+ * query provider. It is intended that only products choose a preferred query provider.
*
* @since 3.2
*/
@@ -37,44 +36,44 @@ public abstract class TextSearchQueryProvider {
* </p>
*/
public static abstract class TextSearchInput {
-
+
/**
* Returns the search text to search for.
- *
+ *
* @return the search text, depending on {@link #isRegExSearch()} the search text represents a regular expression
* or a pattern using '*' and '?' as wildcards. The empty search text signals a file name search.
*/
public abstract String getSearchText();
-
+
/**
* Returns whether the search is a case sensitive search or not.
- *
+ *
* @return whether the pattern is to be used case sensitive or not.
*/
public abstract boolean isCaseSensitiveSearch();
-
+
/**
* Returns whether the search text denotes a regular expression or not.
- *
+ *
* @return whether the pattern denotes a regular expression.
*/
public abstract boolean isRegExSearch();
-
+
/**
* Returns the scope for the search
- *
+ *
* @return the scope for the search
*/
public abstract FileTextSearchScope getScope();
}
-
+
/**
* Returns the preferred query provider. The preferred query provider is typically configured by the product
* and defined by the search plug-in preference 'org.eclipse.search.textSearchQueryProvider'.
* It is not intended that query providers change at runtime, but clients should always use this method to access
* the query provider.
- *
+ *
* @return the preferred {@link TextSearchQueryProvider}.
*/
public static TextSearchQueryProvider getPreferred() {
@@ -83,17 +82,17 @@ public abstract class TextSearchQueryProvider {
/**
* Create a query for the input with the given information.
- *
+ *
* @param textSearchInput the search input
* @return returns the created search query
* @throws CoreException a {@link CoreException} can be thrown when the query provider can not
* create a query for the given input.
*/
public abstract ISearchQuery createQuery(TextSearchInput textSearchInput) throws CoreException;
-
+
/**
* Create a query to search for the selected text in the workspace.
- *
+ *
* @param selectedText the text to search for
* @return returns the created search query
* @throws CoreException a {@link CoreException} can be thrown when the query provider can not
@@ -103,7 +102,7 @@ public abstract class TextSearchQueryProvider {
/**
* Create a query to search for the selected text in the given resources.
- *
+ *
* @param selectedText the text to search for
* @param resources the resources to search in
* @return returns the created search query
@@ -111,10 +110,10 @@ public abstract class TextSearchQueryProvider {
* create a query for the given input.
*/
public abstract ISearchQuery createQuery(String selectedText, IResource[] resources) throws CoreException;
-
+
/**
* Create a query to search for the selected text in the given working sets.
- *
+ *
* @param selectedText the text to search for
* @param ws the working sets to search in
* @return returns the created search query

Back to the top