Skip to main content
summaryrefslogtreecommitdiffstats
blob: 0dabbd02f83482a992f8ac1f7f4fd8f8635422f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/***************************************************************************************************
 * Copyright (c) 2005 IBM Corporation and others. All rights reserved. This program and the
 * accompanying materials are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors: IBM Corporation - initial API and implementation
 **************************************************************************************************/
package org.eclipse.help.search;

import java.net.URL;

/**
 * An extension of the search result interface that allows engines to define engine result icon for
 * each search result.
 *
 * @since 3.2
 */


public interface ISearchEngineResult2 extends ISearchEngineResult {

	/**
	 * Returns a unique identifier that can be associated with this search result. Search engines
	 * can optionally use this method to pass information on documents that are accessible via
	 * hashtables using a unique identifier. This method is typically used when the search result
	 * can open by itself.
	 *
	 * @see #canOpen()
	 * @see ISearchEngine2#open(String)
	 * @return unique identifier associated with this search result or <code>null</code> if not
	 *         available or not needed.
	 */
	String getId();

	/**
	 * Returns an optional URL of the 16x16 icon to be used to render this search result. If not
	 * provided, the icon for the engine will be used.
	 *
	 * @return the URL of the icon to be used to render this search result or <code>null</code> to
	 *         use the engine icon.
	 */
	URL getIconURL();

	/**
	 * Tests whether this result's open action should be delegated to search engine.
	 *
	 * @return <code>true</code> for engines that must open their results using non-standards
	 *         means, or <code>false</code> for opening the result by the help system using the
	 *         provided href.
	 */
	boolean canOpen();
}

Back to the top