KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > services > ISourceProviderService


1 /*******************************************************************************
2  * Copyright (c) 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
12 package org.eclipse.ui.internal.services;
13
14 import org.eclipse.ui.ISourceProvider;
15 import org.eclipse.ui.ISources;
16
17 /**
18  * <p>
19  * A service from which all of the source providers can be retrieved.
20  * </p>
21  * <p>
22  * This class is not intended for use outside of the
23  * <code>org.eclipse.ui.workbench</code> plug-in.
24  * </p>
25  *
26  * @since 3.2
27  */

28 public interface ISourceProviderService {
29
30     /**
31      * Retrieves a source provider providing the given source. This is used by
32      * clients who only need specific sources.
33      *
34      * @param sourceName
35      * The name of the source; must not be <code>null</code>.
36      * @return A source provider which provides the request source, or
37      * <code>null</code> if no such source exists.
38      * @see ISources
39      */

40     public ISourceProvider getSourceProvider(final String JavaDoc sourceName);
41
42     /**
43      * Retrieves all of the source providers registered with this service.
44      *
45      * @return The source providers registered with this service. This value is
46      * never <code>null</code>, but may be empty.
47      */

48     public ISourceProvider[] getSourceProviders();
49
50     /**
51      * Registers a source provider with this service
52      *
53      * @param sourceProvider
54      * The source provider to register; must not be <code>null</code>.
55      */

56     public void registerProvider(ISourceProvider sourceProvider);
57
58 }
59
Popular Tags