KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > scripting > php > dbginterface > api > VariableNode


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.scripting.php.dbginterface.api;
21
22 import java.util.Collection JavaDoc;
23 import org.netbeans.spi.viewmodel.ModelEvent;
24
25
26 /** Represents a node in variables model. Passed back to debugger api for use by
27  * the debugger UI.
28  *
29  * @author Peter Williams
30  */

31 public interface VariableNode {
32
33     // These refer to public icon resources in the NB debugger/core module.
34
public static final String JavaDoc LOCAL_VARIABLE_ICON =
35             "org/netbeans/modules/debugger/resources/localsView/LocalVariable"; // NOI18N
36
public static final String JavaDoc SCRIPT_FIELD_ICON =
37             "org/netbeans/modules/debugger/resources/watchesView/Field"; // NOI18N
38
public static final String JavaDoc SUPER_ICON =
39             "org/netbeans/modules/debugger/resources/watchesView/SuperVariable"; // NOI18N
40
public static final String JavaDoc JAVA_FIELD_ICON =
41             "org/netbeans/modules/debugger/resources/classesView/Classes"; // NOI18N
42

43     // !PW FIXME these references are hacks. Find a way to put in more appropriate icons
44
// or remove the usage of these.
45
public static final String JavaDoc UNDEFINED_FIELD_ICON =
46             "org/netbeans/modules/phobos/localdebugger/resources/undefined"; // NOI18N
47
public static final String JavaDoc FUNCTION_ICON =
48             "org/netbeans/modules/phobos/localdebugger/resources/function"; // NOI18N
49
public static final String JavaDoc SCRIPT_ADAPTER_ICON =
50             "org/netbeans/modules/debugger/resources/watchesView/StaticModifier"; // NOI18N
51

52     // For use by the watch window.
53
public static final String JavaDoc WATCH_ICON =
54             "org/netbeans/modules/debugger/resources/watchesView/Watch"; // NOI18N
55

56
57     // Important: Numeric order of these contants must match order of icons in
58
// array below them.
59
public static final int TYPE_LOCAL_FIELD = 0;
60     public static final int TYPE_SCRIPT_FIELD = 1;
61     public static final int TYPE_JAVA_FIELD = 2;
62     public static final int TYPE_UNDEFINED_FIELD = 3;
63     public static final int TYPE_SUPER = 4;
64     public static final int TYPE_SCRIPT_ADAPTER = 5;
65     public static final int TYPE_FUNCTION = 6;
66     public static final int TYPE_WATCH = 7;
67
68     // ------------------------------------------------------------------------
69
// public api for use by the debugger
70
// ------------------------------------------------------------------------
71
public String JavaDoc getName();
72
73     public String JavaDoc getDisplayName();
74
75     public String JavaDoc getShortDescription();
76
77     public String JavaDoc getIconBase();
78
79     public int getType();
80
81     public String JavaDoc getTypeName();
82
83     public Object JavaDoc getValue();
84
85     public boolean isReadOnly();
86     
87     public String JavaDoc getTooltipValue();
88
89     public VariableNode[] getChildren(int from, int to);
90
91     public boolean isLeaf();
92
93     public int getChildrenCount();
94
95     // ------------------------------------------------------------------------
96
// Private api for use by the model to manage the tree
97
// FIXME Need to find a better way to expose these capabilities.
98
// ------------------------------------------------------------------------
99

100     public void collectUpdates(Object JavaDoc source, Collection JavaDoc<ModelEvent> events, VariableNode newVar);
101 }
102
Popular Tags