Lines 17-40
Link Here
|
17 |
|
17 |
|
18 |
import org.eclipse.cdt.core.dom.IName; |
18 |
import org.eclipse.cdt.core.dom.IName; |
19 |
import org.eclipse.cdt.core.dom.ast.DOMException; |
19 |
import org.eclipse.cdt.core.dom.ast.DOMException; |
20 |
import org.eclipse.cdt.core.dom.ast.IASTDeclarator; |
|
|
21 |
import org.eclipse.cdt.core.dom.ast.IASTName; |
20 |
import org.eclipse.cdt.core.dom.ast.IASTName; |
22 |
import org.eclipse.cdt.core.dom.ast.IASTNode; |
21 |
import org.eclipse.cdt.core.dom.ast.IASTNode; |
23 |
import org.eclipse.cdt.core.dom.ast.IBinding; |
22 |
import org.eclipse.cdt.core.dom.ast.IBinding; |
24 |
import org.eclipse.cdt.core.dom.ast.IScope; |
23 |
import org.eclipse.cdt.core.dom.ast.IScope; |
25 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConversionName; |
|
|
26 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName; |
27 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; |
24 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; |
28 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization; |
25 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization; |
29 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; |
26 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; |
30 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; |
27 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; |
31 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; |
28 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; |
|
|
29 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope; |
32 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization; |
30 |
import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization; |
33 |
import org.eclipse.cdt.core.parser.util.ArrayUtil; |
31 |
import org.eclipse.cdt.core.parser.util.ArrayUtil; |
34 |
import org.eclipse.cdt.core.parser.util.CharArrayObjectMap; |
|
|
35 |
import org.eclipse.cdt.core.parser.util.CharArrayUtils; |
32 |
import org.eclipse.cdt.core.parser.util.CharArrayUtils; |
36 |
import org.eclipse.cdt.core.parser.util.ObjectMap; |
33 |
import org.eclipse.cdt.core.parser.util.ObjectMap; |
37 |
import org.eclipse.cdt.core.parser.util.ObjectSet; |
|
|
38 |
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal; |
34 |
import org.eclipse.cdt.internal.core.dom.parser.ASTInternal; |
39 |
import org.eclipse.cdt.internal.core.dom.parser.IASTInternalScope; |
35 |
import org.eclipse.cdt.internal.core.dom.parser.IASTInternalScope; |
40 |
|
36 |
|
Lines 42-152
Link Here
|
42 |
* @author aniefer |
38 |
* @author aniefer |
43 |
*/ |
39 |
*/ |
44 |
public class CPPClassSpecializationScope implements ICPPClassScope, IASTInternalScope { |
40 |
public class CPPClassSpecializationScope implements ICPPClassScope, IASTInternalScope { |
45 |
private static final char[] CONSTRUCTOR_KEY = "!!!CTOR!!!".toCharArray(); //$NON-NLS-1$ |
|
|
46 |
|
47 |
private CharArrayObjectMap bindings; |
48 |
private ObjectMap instanceMap = ObjectMap.EMPTY_MAP; |
41 |
private ObjectMap instanceMap = ObjectMap.EMPTY_MAP; |
49 |
|
42 |
final private ICPPSpecialization specialization; |
50 |
private ICPPSpecialization specialization; |
|
|
51 |
private boolean isFullyCached = false; |
52 |
private boolean doneConstructors = false; |
53 |
|
43 |
|
54 |
/** |
44 |
/** |
55 |
* @param instance |
45 |
* @param instance |
56 |
*/ |
46 |
*/ |
57 |
public CPPClassSpecializationScope(CPPClassSpecialization specialization ) { |
47 |
public CPPClassSpecializationScope( ICPPSpecialization specialization ) { |
58 |
this.specialization = specialization; |
48 |
this.specialization = specialization; |
59 |
} |
49 |
} |
60 |
|
|
|
61 |
/** |
62 |
* @param instance |
63 |
*/ |
64 |
public CPPClassSpecializationScope(CPPClassInstance instance ) { |
65 |
this.specialization = instance; |
66 |
} |
67 |
|
50 |
|
68 |
private ICPPClassType getOriginalClass(){ |
51 |
private ICPPClassType getOriginalClass(){ |
69 |
return (ICPPClassType) specialization.getSpecializedBinding(); |
52 |
return (ICPPClassType) specialization.getSpecializedBinding(); |
70 |
} |
53 |
} |
71 |
public boolean isFullyCached(){ |
54 |
|
72 |
if( !isFullyCached ){ |
55 |
private IBinding getInstance(IBinding binding) { |
73 |
CPPSemantics.LookupData data = new CPPSemantics.LookupData(); |
56 |
if( instanceMap.containsKey( binding ) ) { |
74 |
try { |
57 |
return (IBinding) instanceMap.get( binding ); |
75 |
CPPSemantics.lookupInScope( data, this, null ); |
58 |
} else if (!(binding instanceof ICPPClassTemplatePartialSpecialization)) { |
76 |
} catch (DOMException e) { |
59 |
IBinding spec = CPPTemplates.createSpecialization( this, binding, specialization.getArgumentMap() ); |
77 |
} |
60 |
if( instanceMap == ObjectMap.EMPTY_MAP ) |
|
|
61 |
instanceMap = new ObjectMap(2); |
62 |
instanceMap.put( binding, spec ); |
63 |
return spec; |
78 |
} |
64 |
} |
79 |
return true; |
65 |
return null; |
80 |
} |
66 |
} |
81 |
|
67 |
|
82 |
public IBinding getBinding( IASTName name, boolean forceResolve ) { |
68 |
public IBinding getBinding( IASTName name, boolean forceResolve ) throws DOMException { |
83 |
char [] c = name.toCharArray(); |
69 |
char [] c = name.toCharArray(); |
84 |
if( bindings == null ) |
70 |
|
85 |
return null; |
71 |
if( CharArrayUtils.equals( c, specialization.getNameCharArray() ) ) |
86 |
|
72 |
if (!CPPClassScope.isConstructorReference( name )) |
87 |
if( CharArrayUtils.equals( c, specialization.getNameCharArray() ) ){ |
73 |
return specialization; |
88 |
if (CPPClassScope.isConstructorReference( name )) |
74 |
|
89 |
c = CONSTRUCTOR_KEY; |
75 |
ICPPClassType specialized = (ICPPClassType) specialization.getSpecializedBinding(); |
90 |
else |
76 |
IScope classScope = specialized.getCompositeScope(); |
91 |
return specialization; |
77 |
IBinding[] bindings = classScope != null ? classScope.find(name.toString()) : null; |
92 |
} |
78 |
|
93 |
|
79 |
if (bindings == null) return null; |
94 |
Object cache = bindings.get( c ); |
80 |
|
95 |
if( cache != null ){ |
81 |
IBinding[] specs = new IBinding[0]; |
96 |
int i = ( cache instanceof ObjectSet ) ? 0 : -1; |
82 |
for (int i = 0; i < bindings.length; i++) { |
97 |
ObjectSet set = ( cache instanceof ObjectSet ) ? (ObjectSet) cache : null; |
83 |
specs = (IBinding[]) ArrayUtil.append(IBinding.class, specs, getInstance(bindings[i])); |
98 |
Object obj = ( set != null ) ? set.keyAt( i ) : cache; |
84 |
} |
99 |
IBinding [] bs = null; |
85 |
specs = (IBinding[]) ArrayUtil.trim(IBinding.class, specs); |
100 |
IBinding binding = null; |
86 |
return CPPSemantics.resolveAmbiguities( name, specs ); |
101 |
while( obj != null ){ |
|
|
102 |
if( obj instanceof IASTName ){ |
103 |
IASTName n = (IASTName) obj; |
104 |
if( n instanceof ICPPASTQualifiedName ){ |
105 |
IASTName [] ns = ((ICPPASTQualifiedName)n).getNames(); |
106 |
n = ns[ ns.length - 1 ]; |
107 |
} |
108 |
if( instanceMap.containsKey( n ) ){ |
109 |
binding = (IBinding) instanceMap.get( n ); |
110 |
} else { |
111 |
binding = CPPClassScope.shouldResolve(forceResolve, n, name) ? n.resolveBinding() : n.getBinding(); |
112 |
if (binding instanceof ICPPClassTemplatePartialSpecialization ){ |
113 |
binding = null; |
114 |
} |
115 |
if( binding != null ){ |
116 |
binding = CPPTemplates.createSpecialization( this, binding, specialization.getArgumentMap() ); |
117 |
if( instanceMap == ObjectMap.EMPTY_MAP ) |
118 |
instanceMap = new ObjectMap(2); |
119 |
instanceMap.put( n, binding ); |
120 |
} |
121 |
} |
122 |
} else if( obj instanceof IBinding ){ |
123 |
if( instanceMap.containsKey( obj ) ){ |
124 |
binding = (IBinding) instanceMap.get( obj ); |
125 |
} else { |
126 |
binding = CPPTemplates.createSpecialization( this, (IBinding) obj, specialization.getArgumentMap() ); |
127 |
if( instanceMap == ObjectMap.EMPTY_MAP ) |
128 |
instanceMap = new ObjectMap(2); |
129 |
instanceMap.put( obj, binding ); |
130 |
} |
131 |
} |
132 |
if( binding != null ){ |
133 |
if( i == -1 ) |
134 |
return binding; |
135 |
bs = (IBinding[]) ArrayUtil.append( IBinding.class, bs, binding ); |
136 |
binding = null; |
137 |
} |
138 |
if( i != -1 && ++i < set.size() ){ |
139 |
obj = set.keyAt( i ); |
140 |
} else { |
141 |
obj = null; |
142 |
} |
143 |
} |
144 |
bs = (IBinding[]) ArrayUtil.trim( IBinding.class, bs ); |
145 |
if( bs.length == 1 ) |
146 |
return bs[0]; |
147 |
return CPPSemantics.resolveAmbiguities( name, bs ); |
148 |
} |
149 |
return null; |
150 |
} |
87 |
} |
151 |
|
88 |
|
152 |
/* (non-Javadoc) |
89 |
/* (non-Javadoc) |
Lines 160-287
Link Here
|
160 |
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope#getImplicitMethods() |
97 |
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope#getImplicitMethods() |
161 |
*/ |
98 |
*/ |
162 |
public ICPPMethod[] getImplicitMethods() { |
99 |
public ICPPMethod[] getImplicitMethods() { |
163 |
// TODO Auto-generated method stub |
100 |
//implicit methods shouldn't have implicit specializations |
164 |
return null; |
101 |
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; |
165 |
} |
102 |
} |
166 |
|
103 |
|
167 |
/* (non-Javadoc) |
104 |
/* (non-Javadoc) |
168 |
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#getScopeName() |
105 |
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#getScopeName() |
169 |
*/ |
106 |
*/ |
170 |
public IName getScopeName() { |
107 |
public IName getScopeName() { |
171 |
return (IASTName) ((ICPPInternalBinding)specialization).getDefinition(); |
108 |
if (specialization instanceof ICPPInternalBinding) |
|
|
109 |
return (IASTName) ((ICPPInternalBinding)specialization).getDefinition(); |
110 |
//TODO: get the scope name for non-internal bindings |
111 |
return null; |
172 |
} |
112 |
} |
173 |
|
113 |
|
174 |
public void addName(IASTName name) { |
114 |
protected ICPPConstructor [] getConstructors() throws DOMException { |
175 |
if( name instanceof ICPPASTQualifiedName ) |
115 |
ICPPClassType specialized = (ICPPClassType) specialization.getSpecializedBinding(); |
176 |
return; |
116 |
ICPPConstructor[] bindings = specialized.getConstructors(); |
177 |
|
117 |
|
178 |
if( bindings == null ) |
118 |
if (bindings == null) return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; |
179 |
bindings = new CharArrayObjectMap(1); |
|
|
180 |
char [] c = name.toCharArray(); |
181 |
|
182 |
IASTNode parent = name.getParent(); |
183 |
if( parent instanceof IASTDeclarator && CPPVisitor.isConstructor( this, (IASTDeclarator) parent ) ){ |
184 |
c = CONSTRUCTOR_KEY; |
185 |
} |
186 |
Object o = bindings.get( c ); |
187 |
if( o != null ){ |
188 |
if( o instanceof ObjectSet ){ |
189 |
((ObjectSet)o).put( name ); |
190 |
} else { |
191 |
ObjectSet temp = new ObjectSet( 2 ); |
192 |
temp.put( o ); |
193 |
temp.put( name ); |
194 |
bindings.put( c, temp ); |
195 |
} |
196 |
} else { |
197 |
bindings.put( c, name ); |
198 |
} |
199 |
} |
200 |
|
201 |
protected ICPPConstructor [] getConstructors( ){ |
202 |
if( bindings == null ) |
203 |
return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; |
204 |
|
119 |
|
205 |
if( !doneConstructors ){ |
120 |
ICPPConstructor[] specs = new ICPPConstructor[0]; |
206 |
ICPPConstructor[] ctors; |
121 |
for (int i = 0; i < bindings.length; i++) { |
207 |
try { |
122 |
specs = (ICPPConstructor[]) ArrayUtil.append(ICPPConstructor.class, specs, getInstance(bindings[i])); |
208 |
ctors = ((ICPPClassType)specialization.getSpecializedBinding()).getConstructors(); |
|
|
209 |
for (int i = 0; i < ctors.length; i++) { |
210 |
addBinding( ctors[i] ); |
211 |
} |
212 |
doneConstructors = true; |
213 |
} catch (DOMException e) { |
214 |
} |
215 |
} |
216 |
ICPPConstructor[] ctors = CPPClassScope.getConstructors( bindings, true ); |
217 |
for (int i = 0; i < ctors.length; i++) { |
218 |
if( instanceMap.containsKey( ctors[i] ) ){ |
219 |
ctors[i] = (ICPPConstructor) instanceMap.get( ctors[i] ); |
220 |
} else { |
221 |
IBinding b = CPPTemplates.createSpecialization( this, ctors[i], specialization.getArgumentMap() ); |
222 |
if( instanceMap == ObjectMap.EMPTY_MAP ) |
223 |
instanceMap = new ObjectMap(2); |
224 |
instanceMap.put( ctors[i], b ); |
225 |
ctors[i] = (ICPPConstructor) b; |
226 |
} |
227 |
} |
123 |
} |
228 |
return ctors; |
124 |
return (ICPPConstructor[]) ArrayUtil.trim(ICPPConstructor.class, specs); |
229 |
} |
125 |
} |
230 |
|
126 |
|
231 |
protected ICPPMethod[] getConversionOperators() { |
127 |
protected ICPPMethod[] getConversionOperators() { |
232 |
if( bindings == null ) |
128 |
ICPPClassType specialized = (ICPPClassType) specialization.getSpecializedBinding(); |
233 |
return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; |
|
|
234 |
|
235 |
ICPPMethod [] result = null; |
236 |
|
129 |
|
237 |
Object[] values = bindings.valueArray(); |
130 |
if (!(specialized instanceof ICPPInternalClassType)) { |
238 |
for (int i = 0; i < values.length; i++) { |
131 |
return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; |
239 |
int j = ( values[i] instanceof ObjectSet ) ? 0 : -1; |
|
|
240 |
ObjectSet set = ( values[i] instanceof ObjectSet ) ? (ObjectSet) values[i] : null; |
241 |
Object obj = ( set != null ) ? set.keyAt( j ) : values[i]; |
242 |
IBinding binding = null; |
243 |
while( obj != null ){ |
244 |
if( obj instanceof IASTName ){ |
245 |
IASTName n = (IASTName) obj; |
246 |
if( n instanceof ICPPASTQualifiedName ){ |
247 |
IASTName [] ns = ((ICPPASTQualifiedName)n).getNames(); |
248 |
n = ns[ ns.length - 1 ]; |
249 |
} |
250 |
|
251 |
if (n instanceof ICPPASTConversionName) { |
252 |
if( instanceMap.containsKey( n ) ){ |
253 |
binding = (IBinding) instanceMap.get( n ); |
254 |
} else { |
255 |
binding = n.resolveBinding(); |
256 |
if( binding != null ){ |
257 |
binding = CPPTemplates.createSpecialization( this, binding, specialization.getArgumentMap() ); |
258 |
if( instanceMap == ObjectMap.EMPTY_MAP ) |
259 |
instanceMap = new ObjectMap(2); |
260 |
instanceMap.put( n, binding ); |
261 |
} |
262 |
} |
263 |
} |
264 |
} |
265 |
if( binding != null ){ |
266 |
result = (ICPPMethod[]) ArrayUtil.append( ICPPMethod.class, result, binding ); |
267 |
binding = null; |
268 |
} |
269 |
if( j != -1 && ++j < set.size() ){ |
270 |
obj = set.keyAt( j ); |
271 |
} else { |
272 |
obj = null; |
273 |
} |
274 |
} |
275 |
} |
132 |
} |
|
|
133 |
|
134 |
ICPPMethod[] bindings = ((ICPPInternalClassType)specialized).getConversionOperators(); |
276 |
|
135 |
|
277 |
return (ICPPMethod[]) ArrayUtil.trim( ICPPMethod.class, result ); |
136 |
if (bindings == null) return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; |
278 |
} |
137 |
|
279 |
|
138 |
ICPPMethod[] specs = new ICPPMethod[0]; |
280 |
/* (non-Javadoc) |
139 |
for (int i = 0; i < bindings.length; i++) { |
281 |
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#setFullyCached(boolean) |
140 |
specs = (ICPPMethod[]) ArrayUtil.append(ICPPMethod.class, specs, getInstance(bindings[i])); |
282 |
*/ |
141 |
} |
283 |
public void setFullyCached(boolean b) { |
142 |
return (ICPPMethod[]) ArrayUtil.trim(ICPPMethod.class, specs); |
284 |
isFullyCached = b; |
|
|
285 |
} |
143 |
} |
286 |
|
144 |
|
287 |
/* (non-Javadoc) |
145 |
/* (non-Javadoc) |
Lines 303-391
Link Here
|
303 |
/* (non-Javadoc) |
161 |
/* (non-Javadoc) |
304 |
* @see org.eclipse.cdt.core.dom.ast.IScope#find(java.lang.String) |
162 |
* @see org.eclipse.cdt.core.dom.ast.IScope#find(java.lang.String) |
305 |
*/ |
163 |
*/ |
306 |
public IBinding[] find(String name) { |
164 |
public IBinding[] find(String name) throws DOMException { |
307 |
return find(name, false); |
165 |
return find(name, false); |
308 |
} |
166 |
} |
309 |
|
167 |
|
310 |
/* (non-Javadoc) |
168 |
/* (non-Javadoc) |
311 |
* @see org.eclipse.cdt.core.dom.ast.IScope#find(java.lang.String) |
169 |
* @see org.eclipse.cdt.core.dom.ast.IScope#find(java.lang.String) |
312 |
*/ |
170 |
*/ |
313 |
public IBinding[] find(String name, boolean prefixLookup) { |
171 |
public IBinding[] find(String name, boolean prefixLookup) throws DOMException { |
314 |
if( name != null ) {} |
172 |
ICPPClassType specialized = (ICPPClassType) specialization.getSpecializedBinding(); |
315 |
return null; |
173 |
IBinding[] bindings = specialized.getCompositeScope().find(name.toString(), prefixLookup); |
|
|
174 |
|
175 |
if (bindings == null) return null; |
176 |
|
177 |
IBinding[] specs = new IBinding[0]; |
178 |
for (int i = 0; i < bindings.length; i++) { |
179 |
specs = (IBinding[]) ArrayUtil.append(IBinding.class, specs, getInstance(bindings[i])); |
180 |
} |
181 |
return (IBinding[]) ArrayUtil.trim(IBinding.class, specs); |
316 |
} |
182 |
} |
317 |
|
183 |
|
318 |
/* (non-Javadoc) |
184 |
/* (non-Javadoc) |
319 |
* @see org.eclipse.cdt.core.dom.ast.IScope#getPhysicalNode() |
185 |
* @see org.eclipse.cdt.internal.core.dom.parser.IASTInternalScope#isFullyCached() |
320 |
*/ |
186 |
*/ |
321 |
public IASTNode getPhysicalNode() throws DOMException { |
187 |
public boolean isFullyCached() throws DOMException { |
322 |
ICPPClassType cls = getOriginalClass(); |
188 |
ICPPScope origScope = (ICPPScope) getOriginalClass().getCompositeScope(); |
323 |
ICPPClassScope scope = (ICPPClassScope)cls.getCompositeScope(); |
189 |
if (!ASTInternal.isFullyCached(origScope)) { |
324 |
|
190 |
CPPSemantics.LookupData data = new CPPSemantics.LookupData(); |
325 |
IASTNode node= ASTInternal.getPhysicalNodeOfScope(scope); |
191 |
try { |
326 |
if (node != null) { |
192 |
CPPSemantics.lookupInScope( data, origScope, null ); |
327 |
return node; |
193 |
} catch (DOMException e) { |
|
|
194 |
} |
328 |
} |
195 |
} |
329 |
|
196 |
return true; |
330 |
IASTNode[] nds= ASTInternal.getDeclarationsOfBinding(cls); |
|
|
331 |
|
332 |
if( nds != null && nds.length > 0 ) |
333 |
return nds[0]; |
334 |
|
335 |
return null; |
336 |
} |
337 |
|
338 |
/* (non-Javadoc) |
339 |
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#removeBinding(org.eclipse.cdt.core.dom.ast.IBinding) |
340 |
*/ |
341 |
public void removeBinding(IBinding binding) { |
342 |
char [] name = binding.getNameCharArray(); |
343 |
if( ! bindings.containsKey( name ) ) |
344 |
return; |
345 |
|
346 |
Object obj = bindings.get( name ); |
347 |
if( obj instanceof ObjectSet ){ |
348 |
ObjectSet set = (ObjectSet) obj; |
349 |
set.remove( binding ); |
350 |
if( set.size() == 0 ) |
351 |
bindings.remove( name, 0, name.length ); |
352 |
} else { |
353 |
bindings.remove( name, 0, name.length ); |
354 |
} |
355 |
|
356 |
if( instanceMap != null && instanceMap.containsKey( binding ) ) |
357 |
instanceMap.remove( binding ); |
358 |
isFullyCached = false; |
359 |
} |
360 |
|
361 |
public void flushCache() { |
362 |
if( bindings != null ) |
363 |
bindings.clear(); |
364 |
isFullyCached = false; |
365 |
} |
366 |
|
367 |
public void addBinding(IBinding binding) { |
368 |
if( bindings == null ) |
369 |
bindings = new CharArrayObjectMap(1); |
370 |
char [] c = (binding instanceof ICPPConstructor) ? CONSTRUCTOR_KEY : binding.getNameCharArray(); |
371 |
Object o = bindings.get( c ); |
372 |
if( o != null ){ |
373 |
if( o instanceof ObjectSet ){ |
374 |
((ObjectSet)o).put( binding ); |
375 |
} else { |
376 |
ObjectSet set = new ObjectSet(2); |
377 |
set.put( o ); |
378 |
set.put( binding ); |
379 |
bindings.put( c, set ); |
380 |
} |
381 |
} else { |
382 |
bindings.put( c, binding ); |
383 |
} |
384 |
} |
197 |
} |
385 |
|
198 |
|
386 |
public IBinding getInstance( IBinding binding ){ |
199 |
//this scope does not cache its own names |
387 |
if( instanceMap != null && instanceMap.containsKey( binding ) ) |
200 |
public void setFullyCached(boolean b) {} |
388 |
return (IBinding) instanceMap.get( binding ); |
201 |
public void flushCache() {} |
389 |
return null; |
202 |
public void addName(IASTName name) {} |
390 |
} |
203 |
public IASTNode getPhysicalNode() {return null;} |
|
|
204 |
public void removeBinding(IBinding binding) {} |
205 |
public void addBinding(IBinding binding) {} |
391 |
} |
206 |
} |