KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > AbstractTocProvider


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 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.help;
12
13 import org.eclipse.help.internal.HelpPlugin;
14
15 /**
16  * An <code>AbstractTocProvider</code> is a mechanism to provide arbitrary
17  * content to the table of contents (TOC). <code>AbstractTocProvider</code>s
18  * must be registered via the <code>org.eclipse.help.toc</code> extension point.
19  *
20  * @since 3.3
21  */

22 public abstract class AbstractTocProvider {
23
24     /**
25      * Returns all toc contributions for this provider. Providers
26      * are free to provide any number of contributions (zero or more).
27      *
28      * @param locale the locale for which to get contributions
29      * @return all the contributions for this provider
30      */

31     public abstract ITocContribution[] getTocContributions(String JavaDoc locale);
32     
33     /**
34      * Notifies the platform that the content managed by this provider may
35      * have changed since the last time <code>getTocContributions()</code>
36      * was called, and needs to be updated.
37      */

38     protected void contentChanged() {
39         // will force a reload next time around
40
HelpPlugin.getTocManager().clearCache();
41     }
42 }
43
Popular Tags