improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / search / IJavaSearchConstants.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.core.search;
12
13 //import net.sourceforge.phpdt.internal.core.search.processing.*;
14
15 /**
16  * <p>
17  * This interface defines the constants used by the search engine.
18  * </p>
19  * <p>
20  * This interface declares constants only; it is not intended to be implemented.
21  * </p>
22  * @see org.eclipse.jdt.core.search.SearchEngine
23  */
24 public interface IJavaSearchConstants {
25
26         /**
27          * The nature of searched element or the nature
28          * of match in unknown.
29          */
30         int UNKNOWN = -1;
31         
32         /* Nature of searched element */
33         
34         /**
35          * The searched element is a type.
36          */
37         int TYPE= 0;
38
39         /**
40          * The searched element is a method.
41          */
42         int METHOD= 1;
43
44         /**
45          * The searched element is a package.
46          */
47         int PACKAGE= 2;
48
49         /**
50          * The searched element is a constructor.
51          */
52         int CONSTRUCTOR= 3;
53
54         /**
55          * The searched element is a field.
56          */
57         int FIELD= 4;
58
59         /**
60          * The searched element is a class. 
61          * More selective than using TYPE
62          */
63         int CLASS= 5;
64
65         /**
66          * The searched element is an interface.
67          * More selective than using TYPE
68          */
69         int INTERFACE= 6;
70
71         /* Nature of match */
72         
73         /**
74          * The search result is a declaration.
75          * Can be used in conjunction with any of the nature of searched elements
76          * so as to better narrow down the search.
77          */
78         int DECLARATIONS= 0;
79
80         /**
81          * The search result is a type that implements an interface. 
82          * Used in conjunction with either TYPE or CLASS or INTERFACE, it will
83          * respectively search for any type implementing/extending an interface, or
84          * rather exclusively search for classes implementing an interface, or interfaces 
85          * extending an interface.
86          */
87         int IMPLEMENTORS= 1;
88
89         /**
90          * The search result is a reference.
91          * Can be used in conjunction with any of the nature of searched elements
92          * so as to better narrow down the search.
93          * References can contain implementers since they are more generic kind
94          * of matches.
95          */
96         int REFERENCES= 2;
97
98         /**
99          * The search result is a declaration, a reference, or an implementer 
100          * of an interface.
101          * Can be used in conjunction with any of the nature of searched elements
102          * so as to better narrow down the search.
103          */
104         int ALL_OCCURRENCES= 3;
105
106         /**
107          * When searching for field matches, it will exclusively find read accesses, as
108          * opposed to write accesses. Note that some expressions are considered both
109          * as field read/write accesses: for example, x++; x+= 1;
110          * 
111          * @since 2.0
112          */
113         int READ_ACCESSES = 4;
114         
115         /**
116          * When searching for field matches, it will exclusively find write accesses, as
117          * opposed to read accesses. Note that some expressions are considered both
118          * as field read/write accesses: for example,  x++; x+= 1;
119          * 
120          * @since 2.0
121          */
122         int WRITE_ACCESSES = 5;
123         
124         /* Syntactic match modes */
125         
126         /**
127          * The search pattern matches exactly the search result,
128          * that is, the source of the search result equals the search pattern.
129          * @deprecated Use {@link SearchPattern#R_EXACT_MATCH} instead.
130          */
131         int EXACT_MATCH = 0;
132         /**
133          * The search pattern is a prefix of the search result.
134          * @deprecated Use {@link SearchPattern#R_PREFIX_MATCH} instead.
135          */
136         int PREFIX_MATCH = 1;
137         /**
138          * The search pattern contains one or more wild cards ('*') where a 
139          * wild-card can replace 0 or more characters in the search result.
140          * @deprecated Use {@link SearchPattern#R_PATTERN_MATCH} instead.
141          */
142         int PATTERN_MATCH = 2;
143
144
145         /* Case sensitivity */
146         
147         /**
148          * The search pattern matches the search result only
149          * if cases are the same.
150          * @deprecated Use the methods that take the matchMode
151          *   with {@link SearchPattern#R_CASE_SENSITIVE} as a matchRule instead.
152          */
153         boolean CASE_SENSITIVE = true;
154         /**
155          * The search pattern ignores cases in the search result.
156          * @deprecated Use the methods that take the matchMode
157          *   without {@link SearchPattern#R_CASE_SENSITIVE} as a matchRule instead.
158          */
159         boolean CASE_INSENSITIVE = false;
160         
161
162         /* Waiting policies */
163         
164         /**
165          * The search operation starts immediately, even if the underlying indexer
166          * has not finished indexing the workspace. Results will more likely
167          * not contain all the matches.
168          */
169 //      int FORCE_IMMEDIATE_SEARCH = IJob.ForceImmediate;
170         /**
171          * The search operation throws an <code>org.eclipse.core.runtime.OperationCanceledException</code>
172          * if the underlying indexer has not finished indexing the workspace.
173          */
174 //      int CANCEL_IF_NOT_READY_TO_SEARCH = IJob.CancelIfNotReady;
175         /**
176          * The search operation waits for the underlying indexer to finish indexing 
177          * the workspace before starting the search.
178          */
179 //      int WAIT_UNTIL_READY_TO_SEARCH = IJob.WaitUntilReady;
180         
181         
182 }