01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui;
11:
12: import org.eclipse.core.resources.IMarker;
13:
14: /**
15: * Registry of F1 help contexts and resolutions for markers.
16: * <p>
17: * The information contained in the registry is read from the
18: * org.eclipse.ui.markerhelp and org.eclipse.ui.markerresolution
19: * extension points.
20: * </p>
21: *
22: * @since 2.0
23: */
24: public interface IMarkerHelpRegistry {
25: /**
26: * Returns a help context id for the given marker or
27: * <code>null</code> if no help has been registered
28: * for the marker.
29: *
30: * @param marker the marker for which to obtain help
31: * @since 2.0
32: */
33: public String getHelp(IMarker marker);
34:
35: /**
36: * Returns <code>false</code> if there are no resolutions for
37: * the given marker. Returns <code>true</code> if their may
38: * be resolutions. In most cases a <code>true</code> value
39: * means there are resolutions but due to plugin loading
40: * issues getResolutions may sometimes return an empty array
41: * after this method returns <code>true</code>.
42: *
43: * @param marker the marker for which to determine if there
44: * are resolutions
45: * @since 2.0
46: */
47: public boolean hasResolutions(IMarker marker);
48:
49: /**
50: * Returns an array of resolutions for the given marker.
51: * The returned array will be empty if there are no resolutions
52: * for the marker.
53: *
54: * @param marker the marker for which to obtain resolutions
55: * @since 2.0
56: */
57: public IMarkerResolution[] getResolutions(IMarker marker);
58: }
|