01: /*******************************************************************************
02: * Copyright (c) 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.internal.services;
11:
12: import org.eclipse.ui.ISourceProvider;
13: import org.eclipse.ui.ISources;
14:
15: /**
16: * <p>
17: * A service from which all of the source providers can be retrieved.
18: * </p>
19: * <p>
20: * This class is not intended for use outside of the
21: * <code>org.eclipse.ui.workbench</code> plug-in.
22: * </p>
23: *
24: * @since 3.2
25: */
26: public interface ISourceProviderService {
27:
28: /**
29: * Retrieves a source provider providing the given source. This is used by
30: * clients who only need specific sources.
31: *
32: * @param sourceName
33: * The name of the source; must not be <code>null</code>.
34: * @return A source provider which provides the request source, or
35: * <code>null</code> if no such source exists.
36: * @see ISources
37: */
38: public ISourceProvider getSourceProvider(final String sourceName);
39:
40: /**
41: * Retrieves all of the source providers registered with this service.
42: *
43: * @return The source providers registered with this service. This value is
44: * never <code>null</code>, but may be empty.
45: */
46: public ISourceProvider[] getSourceProviders();
47:
48: /**
49: * Registers a source provider with this service
50: *
51: * @param sourceProvider
52: * The source provider to register; must not be <code>null</code>.
53: */
54: public void registerProvider(ISourceProvider sourceProvider);
55:
56: }
|