Extended the builder with an index file generator for PHP class- and function-names.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / externaltools / internal / registry / RefreshScopeVariableRegistry.java
1 package net.sourceforge.phpdt.externaltools.internal.registry;
2
3 /**********************************************************************
4 Copyright (c) 2002 IBM Corp. and others. All rights reserved.
5 This file is made available under the terms of the Common Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/cpl-v10.html
8  
9 Contributors:
10 **********************************************************************/
11
12 import org.eclipse.core.runtime.IConfigurationElement;
13 import net.sourceforge.phpdt.externaltools.model.IExternalToolConstants;
14
15 /**
16  * Registry of all available refresh scope variables.
17  */
18 public class RefreshScopeVariableRegistry extends ExternalToolVariableRegistry {
19
20         /**
21          * Creates the registry and loads the variables.
22          */
23         public RefreshScopeVariableRegistry() {
24                 super(IExternalToolConstants.EXTENSION_POINT_REFRESH_VARIABLES);
25         }
26
27         /**
28          * Returns the refresh scope variable for the given tag
29          * or <code>null</code> if none.
30          */
31         public RefreshScopeVariable getRefreshVariable(String tag) {
32                 return (RefreshScopeVariable) findVariable(tag);
33         }
34         
35         /**
36          * Returns the list of refresh scope variables in the registry.
37          */
38         public RefreshScopeVariable[] getRefreshVariables() {
39                 RefreshScopeVariable[] results = new RefreshScopeVariable[getVariableCount()];
40                 copyVariables(results);
41                 return results;
42         }
43         
44         /* (non-Javadoc)
45          * Method declared on ExternalToolVariableRegistry.
46          */
47         protected ExternalToolVariable newVariable(String tag, String description, IConfigurationElement element) {
48                 return new RefreshScopeVariable(tag, description, element);
49         }
50 }