KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > corext > buildpath > PackageExplorerActionEvent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.jdt.internal.corext.buildpath;
13
14 import org.eclipse.jdt.internal.ui.wizards.buildpaths.newsourcepage.ClasspathModifierAction;
15
16
17 /**
18  * Event that is fired from <code>PackageExplorerActionGroup</code>
19  * if some change on the available actions happens.
20  */

21 public class PackageExplorerActionEvent {
22     
23     private String JavaDoc[] fEnabledActionsDescriptions;
24     private ClasspathModifierAction[] fEnabledActions;
25     
26     /**
27      * Create a package explorer action event containing actions
28      * and their corresponding descriptions. It is allowed to
29      * provide arrays which are empty, <code>null</code> is not
30      * allowed.
31      *
32      * Also consider the case where there are no actions (the size is zero), but
33      * the description array contains one element which contains a statement for
34      * the fact that there are no actions.
35      *
36      * @param enabledActionsDescriptions an array of descriptions for the
37      * actions. The description at position 'i' must correspond to the action at
38      * position 'i'.
39      * @param enabledActions an array of actions
40      */

41     public PackageExplorerActionEvent(String JavaDoc[] enabledActionsDescriptions, ClasspathModifierAction[] enabledActions) {
42         fEnabledActionsDescriptions= enabledActionsDescriptions;
43         fEnabledActions= enabledActions;
44     }
45     
46     /**
47      * Get the available actions. To get the corresponding
48      * descriptions, <code>getEnabledActionsText()</code> can
49      * be used.
50      *
51      * @return an array of available actions, can be empty, but
52      * not <code>null</code>.
53      *
54      * @see #getEnabledActionsText()
55      */

56     public ClasspathModifierAction[] getEnabledActions() {
57         return fEnabledActions;
58     }
59     
60     /**
61      * Get the descriptions to the available actions.
62      *
63      * @return an array of descriptions corresponding to
64      * the available actions of <code>getEnabledActions</code>.
65      * Can be empty, but not <code>null</code>.
66      *
67      * @see #getEnabledActions()
68      */

69     public String JavaDoc[] getEnabledActionsText() {
70         return fEnabledActionsDescriptions;
71     }
72 }
73
Popular Tags