blob: ec26839d562e7cf9eb2a4205ef6213d3af67bec8 [file] [log] [blame]
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
package org.eclipse.search.ui;
import org.eclipse.swt.graphics.Image;
import org.eclipse.search.internal.ui.SearchPlugin;
import org.eclipse.search.internal.ui.SearchPluginImages;
/**
* The central class for access to the Search Plug-in's User Interface.
* This class cannot be instantiated; all functionality is provided by
* static methods.
*
* Features provided:
* <ul>
* <li>convenient access to the search result view of the active workbench
* window.</li>
* </ul>
* <p>
*
* @see ISearchResultView
*/
public final class SearchUI {
/**
* 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$
/**
* Line marker attribute (value <code>"line"</code>)
* The value of the marker attribute is the line which contains the text search match.
*
* @see org.eclipse.core.resources.IMarker#getAttribute
*/
public static final String LINE= "line"; //$NON-NLS-1$
/**
* Id of the search result view
* (value <code>"org.eclipse.search.SearchResultView"</code>).
*/
public static final String SEARCH_RESULT_VIEW_ID= PLUGIN_ID + ".SearchResultView"; //$NON-NLS-1$
/**
* Activates the search result view in the active page of the
* active workbench window. This call has no effect (but returns <code>true</code>
* if the search result view is already activated.
*
* @return <code>true</code> if the search result view could be activated
*/
public static boolean activateSearchResultView() {
return SearchPlugin.activateSearchResultView();
}
/**
* Returns the search result view of the active page of the
* active workbench window.
*
* @return the search result view or <code>null</code>
* if there is no active search result view
*/
public static ISearchResultView getSearchResultView() {
return SearchPlugin.getSearchResultView();
}
/**
* Returns the shared search marker image.
* Normally, editors show this icon in their vertical ruler.
* This image is owned by the search UI plug-in and must not be disposed
* by clients.
*
* @return the shared image
*/
public static Image getSearchMarkerImage() {
return SearchPluginImages.get(SearchPluginImages.IMG_OBJ_SEARCHMARKER);
}
/**
* Block instantiation.
*/
private SearchUI() {
}
}