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