KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > text > completion > EmptyQuery


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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.text.completion;
21
22 import java.util.Enumeration JavaDoc;
23
24 import org.w3c.dom.*;
25
26 import org.netbeans.modules.xml.api.model.*;
27
28 /**
29  * This query always returns an empty result from all its query methods.
30  *
31  * @author Petr Kuzel
32  */

33 public class EmptyQuery implements GrammarQuery {
34
35     /**
36      * Shared instance.
37      */

38     public static final GrammarQuery INSTANCE = new EmptyQuery();
39
40     // inherit JavaDoc from interface description
41

42     public Enumeration JavaDoc queryEntities(String JavaDoc prefix) {
43         return org.openide.util.Enumerations.empty();
44     }
45     
46     public Enumeration JavaDoc queryAttributes(HintContext ctx) {
47         return org.openide.util.Enumerations.empty();
48     }
49     
50     public Enumeration JavaDoc queryElements(HintContext ctx) {
51         return org.openide.util.Enumerations.empty();
52     }
53     
54     public Enumeration JavaDoc queryNotations(String JavaDoc prefix) {
55         return org.openide.util.Enumerations.empty();
56     }
57     
58     public Enumeration JavaDoc queryValues(HintContext ctx) {
59         return org.openide.util.Enumerations.empty();
60     }
61     
62     public boolean isAllowed(Enumeration JavaDoc en) {
63         return false;
64     }
65     
66     public GrammarResult queryDefault(HintContext virtualNodeCtx) {
67         return null;
68     }
69     
70     public java.awt.Component JavaDoc getCustomizer(HintContext ctx) {
71         return null;
72     }
73     
74     public boolean hasCustomizer(HintContext ctx) {
75         return false;
76     }
77
78     public org.openide.nodes.Node.Property[] getProperties(HintContext ctx) {
79         return null;
80     }
81     
82     
83 }
84
Popular Tags