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